{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 第十二篇：样式"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pandas 的 Style 是一个正在被大多数人忽视的可视化方法，它不仅仅是为了美化一下数据提高数据的颜值这么简单。回忆一下，或许你刚刚这么做过，我们在 Excel 中是不是经常对特定的数据加粗、标红、背景黄，又红又粗加背景黄。这些操作就是让我们看数据更加醒目清晰，突显出数据的逻辑和特征来。\n",
    "样式的基本理念是用户在调整数据显示形式的同时，不会影响数据本身的计算操作。\n",
    "最直观的样式是货币符号，如果只显示一个数字，比如 25.06，读者并不清楚这个数字代表的到底是美元、英镑、日元还是人民币，但 ￥25.06，大家就都知道这是人民币了，由此可见，样式可以让数据提供更多信息。\n",
    "百分比也是数据样式的重要形式，0.12 就不如 12% 更直观，用百分比说明数据更清晰，也更简单。\n",
    "\n",
    "Pandas 支持不同样式，可以用更易理解的方式显示数据，但并未修改数据的类型，所以依然还可以用 Pandas 提供的各种数学、日期、字符串函数处理数据。\n",
    "\n",
    "Pandas 样式还包括内容里提及的高级样式，比如添加颜色与条形图等可视化元素。\n",
    "\n",
    "**功能**\n",
    "\n",
    "主要的功能有：\n",
    "\n",
    "- 数值格式化，如千分号、小数位数、货币符号、日期格式，百分比等等\n",
    "- 突显某些数据，对行、列或者特定的值（如最大最小值）使用样式，如字体大小、黄色、背景\n",
    "- 显示数据关系，如用颜色深浅代表数据大大小\n",
    "- 迷你条形图，如在一个百分比的格子里，用颜色比例表达占比\n",
    "- 表达趋势，类似 Excel 中每行代表趋势变化的迷你走势图（sparkline）\n",
    "- 等等。\n",
    "\n",
    "我们发现，样式和可视化图表的区别是，图表一般数据图形化不关注具体数据内容，而样式则在保留具体内容的基础上进行修饰，让可读性更强。有时候两者有交叉共用的情况。\n",
    "\n",
    "**Styler 对象**\n",
    "\n",
    "DataFrame 有一个 `df.style` Styler 对象，用来生成数据的样式，样式是使用 CSS 来完成的，如果你懂点 CSS 的知识会得心应手很多，不过也不用担心，它非常简单，基本就是一个字典，英文也是我们最常见的。\n",
    "\n",
    "这儿有个技巧，使用 style 可以在 notebook 上未给样式的情况下显示所有的数据：\n",
    "\n",
    "```python\n",
    "df.style # 可实现显示所有数据\n",
    "```\n",
    "\n",
    "所有的样式功能都在 `df.style` 里。需要注意的是，输出的是一个 Styler 对象不是 DataFrame，原始 DataFrame 内容并没有改变。\n",
    "\n",
    "**样式的导出**\n",
    "\n",
    "带有样式的 `df.style` 可以使用 `df.style.to_excel()` 导出，导出后的 excel 会保留样式。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np \n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>team</th>\n",
       "      <th>Q1</th>\n",
       "      <th>Q2</th>\n",
       "      <th>Q3</th>\n",
       "      <th>Q4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Liver</td>\n",
       "      <td>E</td>\n",
       "      <td>89</td>\n",
       "      <td>21</td>\n",
       "      <td>24</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Arry</td>\n",
       "      <td>C</td>\n",
       "      <td>36</td>\n",
       "      <td>37</td>\n",
       "      <td>37</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ack</td>\n",
       "      <td>A</td>\n",
       "      <td>57</td>\n",
       "      <td>60</td>\n",
       "      <td>18</td>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Eorge</td>\n",
       "      <td>C</td>\n",
       "      <td>93</td>\n",
       "      <td>96</td>\n",
       "      <td>71</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Oah</td>\n",
       "      <td>D</td>\n",
       "      <td>65</td>\n",
       "      <td>49</td>\n",
       "      <td>61</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    name team  Q1  Q2  Q3  Q4\n",
       "0  Liver    E  89  21  24  64\n",
       "1   Arry    C  36  37  37  57\n",
       "2    Ack    A  57  60  18  84\n",
       "3  Eorge    C  93  96  71  78\n",
       "4    Oah    D  65  49  61  86"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_excel('data/team.xlsx')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第一部分：内置样式\n",
    "Pandas 提供了几个非常常用的内置样式，是我们经常要使用的，这一部分将对这些提高计数效率的样式功能进行介绍。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 空值高亮 highlight_null\n",
    "对为空的值，高亮标示。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_b3292_row1_col1{\n",
       "            background-color:  red;\n",
       "        }</style><table id=\"T_b3292_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_b3292_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_b3292_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_b3292_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_b3292_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_b3292_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_b3292_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_b3292_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_b3292_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_b3292_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_b3292_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_b3292_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_b3292_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_b3292_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_b3292_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_b3292_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_b3292_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_b3292_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_b3292_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_b3292_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_b3292_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_b3292_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_b3292_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_b3292_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_b3292_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_b3292_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_b3292_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_b3292_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_b3292_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_b3292_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_b3292_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_b3292_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_b3292_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_b3292_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_b3292_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_b3292_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a0fc10310>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.iloc[1,1] = np.NaN # 修改一个值空\n",
    "df.head().style.highlight_null() # 默认红色"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可以指定颜色："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_ca2ac_row1_col1{\n",
       "            background-color:  blue;\n",
       "        }</style><table id=\"T_ca2ac_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_ca2ac_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_ca2ac_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_ca2ac_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_ca2ac_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_ca2ac_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_ca2ac_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_ca2ac_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ca2ac_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_ca2ac_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_ca2ac_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_ca2ac_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_ca2ac_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_ca2ac_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_ca2ac_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ca2ac_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_ca2ac_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_ca2ac_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_ca2ac_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_ca2ac_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_ca2ac_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_ca2ac_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ca2ac_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_ca2ac_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_ca2ac_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_ca2ac_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_ca2ac_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_ca2ac_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_ca2ac_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ca2ac_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_ca2ac_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_ca2ac_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_ca2ac_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_ca2ac_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_ca2ac_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_ca2ac_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a109db100>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用颜色名\n",
    "df.head().style.highlight_null(null_color='blue')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_5f6b4_row1_col1{\n",
       "            background-color:  #ccc;\n",
       "        }</style><table id=\"T_5f6b4_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_5f6b4_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_5f6b4_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_5f6b4_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_5f6b4_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_5f6b4_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_5f6b4_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_5f6b4_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5f6b4_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_5f6b4_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_5f6b4_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_5f6b4_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_5f6b4_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_5f6b4_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_5f6b4_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5f6b4_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_5f6b4_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_5f6b4_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_5f6b4_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_5f6b4_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_5f6b4_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_5f6b4_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5f6b4_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_5f6b4_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_5f6b4_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_5f6b4_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_5f6b4_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_5f6b4_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_5f6b4_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5f6b4_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_5f6b4_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_5f6b4_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_5f6b4_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_5f6b4_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_5f6b4_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_5f6b4_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a33cd0>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用颜色值\n",
    "df.head().style.highlight_null(null_color='#ccc')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 最大最小值高亮"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_aff00_row3_col2,#T_aff00_row3_col3,#T_aff00_row3_col4,#T_aff00_row4_col5{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_aff00_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_aff00_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_aff00_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_aff00_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_aff00_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_aff00_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_aff00_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_aff00_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_aff00_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_aff00_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_aff00_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_aff00_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_aff00_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_aff00_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_aff00_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_aff00_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_aff00_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_aff00_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_aff00_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_aff00_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_aff00_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_aff00_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_aff00_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_aff00_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_aff00_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_aff00_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_aff00_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_aff00_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_aff00_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_aff00_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_aff00_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_aff00_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_aff00_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_aff00_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_aff00_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_aff00_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a317f0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 最大值高亮\n",
    "df.head().style.highlight_max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_08b62_row0_col3,#T_08b62_row1_col2,#T_08b62_row1_col5,#T_08b62_row2_col4{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_08b62_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_08b62_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_08b62_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_08b62_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_08b62_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_08b62_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_08b62_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_08b62_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_08b62_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_08b62_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_08b62_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_08b62_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_08b62_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_08b62_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_08b62_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_08b62_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_08b62_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_08b62_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_08b62_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_08b62_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_08b62_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_08b62_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_08b62_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_08b62_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_08b62_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_08b62_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_08b62_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_08b62_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_08b62_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_08b62_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_08b62_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_08b62_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_08b62_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_08b62_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_08b62_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_08b62_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a5f4c0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 最小值高亮\n",
    "df.head().style.highlight_min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_64823_row0_col3,#T_64823_row1_col2,#T_64823_row1_col5,#T_64823_row2_col4{\n",
       "            background-color:  yellow;\n",
       "        }#T_64823_row3_col2,#T_64823_row3_col3,#T_64823_row3_col4,#T_64823_row4_col5{\n",
       "            background-color:  lime;\n",
       "        }</style><table id=\"T_64823_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_64823_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_64823_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_64823_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_64823_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_64823_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_64823_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_64823_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_64823_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_64823_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_64823_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_64823_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_64823_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_64823_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_64823_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_64823_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_64823_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_64823_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_64823_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_64823_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_64823_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_64823_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_64823_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_64823_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_64823_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_64823_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_64823_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_64823_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_64823_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_64823_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_64823_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_64823_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_64823_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_64823_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_64823_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_64823_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a534f0>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 同时使用+指定颜色\n",
    "(df.head()\n",
    " .style.highlight_max(color='lime') # 最大值高亮\n",
    " .highlight_min() # 最小值\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "以上在在一列中的最大和最小，也可以指定在行上的最大和最小："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_a7430_row0_col2,#T_a7430_row1_col5,#T_a7430_row2_col5,#T_a7430_row3_col3,#T_a7430_row4_col5{\n",
       "            background-color:  lime;\n",
       "        }#T_a7430_row0_col3,#T_a7430_row1_col2,#T_a7430_row2_col4,#T_a7430_row3_col4,#T_a7430_row4_col3{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_a7430_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_a7430_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_a7430_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_a7430_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_a7430_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_a7430_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_a7430_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_a7430_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a7430_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_a7430_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_a7430_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_a7430_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_a7430_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_a7430_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_a7430_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a7430_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_a7430_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_a7430_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_a7430_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_a7430_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_a7430_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_a7430_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a7430_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_a7430_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_a7430_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_a7430_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_a7430_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_a7430_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_a7430_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a7430_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_a7430_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_a7430_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_a7430_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_a7430_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_a7430_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_a7430_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a57100>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 指定行级\n",
    "(df.head()\n",
    " .style.highlight_max(color='lime', axis=1) # 最大值高亮, 绿色\n",
    " .highlight_min(axis=1) # 最小值，黄色\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "也可以作用于指定行："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_79135_row1_col2{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_79135_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_79135_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_79135_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_79135_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_79135_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_79135_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_79135_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_79135_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_79135_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_79135_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_79135_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_79135_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_79135_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_79135_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_79135_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_79135_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_79135_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_79135_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_79135_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_79135_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_79135_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_79135_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_79135_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_79135_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_79135_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_79135_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_79135_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_79135_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_79135_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_79135_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_79135_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_79135_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_79135_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_79135_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_79135_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_79135_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a0f238910>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 只对 数量 起作用\n",
    "df.head().style.highlight_min(subset=['Q1'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_3aa18_row0_col3,#T_3aa18_row1_col2{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_3aa18_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_3aa18_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_3aa18_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_3aa18_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_3aa18_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_3aa18_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_3aa18_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_3aa18_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3aa18_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_3aa18_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_3aa18_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_3aa18_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_3aa18_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_3aa18_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_3aa18_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3aa18_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_3aa18_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_3aa18_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_3aa18_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_3aa18_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_3aa18_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_3aa18_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3aa18_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_3aa18_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_3aa18_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_3aa18_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_3aa18_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_3aa18_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_3aa18_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3aa18_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_3aa18_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_3aa18_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_3aa18_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_3aa18_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_3aa18_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_3aa18_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a538b0>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.highlight_min(subset=['Q1', 'Q2']) # 两列"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_83cd3_row0_col3,#T_83cd3_row1_col2{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_83cd3_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_83cd3_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_83cd3_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_83cd3_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_83cd3_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_83cd3_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_83cd3_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_83cd3_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_83cd3_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_83cd3_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_83cd3_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_83cd3_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_83cd3_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_83cd3_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_83cd3_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_83cd3_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_83cd3_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_83cd3_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_83cd3_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_83cd3_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_83cd3_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_83cd3_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_83cd3_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_83cd3_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_83cd3_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_83cd3_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_83cd3_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_83cd3_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_83cd3_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_83cd3_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_83cd3_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_83cd3_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_83cd3_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_83cd3_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_83cd3_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_83cd3_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_83cd3_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_83cd3_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_83cd3_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_83cd3_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_83cd3_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_83cd3_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_83cd3_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_83cd3_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_83cd3_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_83cd3_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_83cd3_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_83cd3_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_83cd3_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_83cd3_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_83cd3_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_83cd3_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_83cd3_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_83cd3_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_83cd3_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_83cd3_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_83cd3_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_83cd3_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_83cd3_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_83cd3_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_83cd3_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_83cd3_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_83cd3_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a5d520>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用 pd.IndexSlice 索引器（和 loc[] 类似）\n",
    "# 注意，数据是前10行，算最小值的范围是前5行\n",
    "df[:10].style.highlight_min(subset=pd.IndexSlice[:4, ['Q1', 'Q2']])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_f7e53_row0_col3,#T_f7e53_row1_col2,#T_f7e53_row2_col4,#T_f7e53_row3_col4,#T_f7e53_row4_col3,#T_f7e53_row5_col3,#T_f7e53_row6_col5,#T_f7e53_row7_col2,#T_f7e53_row8_col4,#T_f7e53_row9_col3{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_f7e53_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_f7e53_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_f7e53_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_f7e53_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_f7e53_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_f7e53_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_f7e53_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_f7e53_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_f7e53_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_f7e53_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_f7e53_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_f7e53_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_f7e53_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_f7e53_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_f7e53_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_f7e53_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_f7e53_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_f7e53_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_f7e53_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_f7e53_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_f7e53_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_f7e53_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_f7e53_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_f7e53_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_f7e53_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_f7e53_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_f7e53_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_f7e53_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_f7e53_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_f7e53_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_f7e53_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_f7e53_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_f7e53_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_f7e53_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_f7e53_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_f7e53_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_f7e53_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_f7e53_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_f7e53_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_f7e53_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_f7e53_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_f7e53_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_f7e53_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_f7e53_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_f7e53_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_f7e53_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_f7e53_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_f7e53_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_f7e53_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_f7e53_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_f7e53_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_f7e53_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_f7e53_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_f7e53_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_f7e53_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_f7e53_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f7e53_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_f7e53_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_f7e53_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_f7e53_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_f7e53_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_f7e53_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_f7e53_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a57dc0>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 按行，只在这四列进行\n",
    "df[:10].style.highlight_min(axis=1, subset=['Q1','Q2', 'Q3', 'Q4'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 背景渐变 background_gradient\n",
    "根据数值的大小背景颜色呈现梯度渐变，越深表示越大，越浅表示越小，类似于 Excel 的中的色阶样式。颜色指定为 Matplotlib 库的色系表（Matplotlib colormap）中的色系名, 点击查看所有色表。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_3bafb_row0_col2{\n",
       "            background-color:  #03456c;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row0_col3{\n",
       "            background-color:  #e9e5f1;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row0_col4{\n",
       "            background-color:  #f4eef6;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row0_col5{\n",
       "            background-color:  #1278b4;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row1_col2,#T_3bafb_row1_col3{\n",
       "            background-color:  #b8c6e0;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row1_col4{\n",
       "            background-color:  #d3d4e7;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row1_col5{\n",
       "            background-color:  #358fc0;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row2_col2{\n",
       "            background-color:  #509ac6;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row2_col3{\n",
       "            background-color:  #4897c4;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row2_col4,#T_3bafb_row6_col5,#T_3bafb_row7_col2,#T_3bafb_row9_col3{\n",
       "            background-color:  #fff7fb;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row2_col5{\n",
       "            background-color:  #023e62;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row3_col2,#T_3bafb_row3_col3,#T_3bafb_row4_col5,#T_3bafb_row7_col4{\n",
       "            background-color:  #023858;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row3_col4,#T_3bafb_row8_col2{\n",
       "            background-color:  #2a88bc;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row3_col5{\n",
       "            background-color:  #045483;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row4_col2{\n",
       "            background-color:  #2685bb;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row4_col3{\n",
       "            background-color:  #84b0d3;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row4_col4{\n",
       "            background-color:  #65a3cb;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row5_col2{\n",
       "            background-color:  #e0deed;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row5_col3{\n",
       "            background-color:  #f8f1f8;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row5_col4{\n",
       "            background-color:  #045e93;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row5_col5{\n",
       "            background-color:  #89b1d4;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row6_col2{\n",
       "            background-color:  #3991c1;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row6_col3{\n",
       "            background-color:  #023a5b;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row6_col4{\n",
       "            background-color:  #034871;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row7_col3{\n",
       "            background-color:  #fef6fa;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row7_col5{\n",
       "            background-color:  #a7bddb;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row8_col3{\n",
       "            background-color:  #034165;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row8_col4{\n",
       "            background-color:  #7bacd1;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row8_col5{\n",
       "            background-color:  #04639b;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row9_col2{\n",
       "            background-color:  #05659f;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_3bafb_row9_col4{\n",
       "            background-color:  #f0eaf4;\n",
       "            color:  #000000;\n",
       "        }#T_3bafb_row9_col5{\n",
       "            background-color:  #056fae;\n",
       "            color:  #f1f1f1;\n",
       "        }</style><table id=\"T_3bafb_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_3bafb_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_3bafb_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_3bafb_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_3bafb_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_3bafb_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_3bafb_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_3bafb_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_3bafb_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_3bafb_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_3bafb_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_3bafb_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_3bafb_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_3bafb_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_3bafb_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_3bafb_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_3bafb_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_3bafb_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_3bafb_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_3bafb_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_3bafb_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_3bafb_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_3bafb_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_3bafb_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_3bafb_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_3bafb_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_3bafb_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_3bafb_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_3bafb_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_3bafb_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_3bafb_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_3bafb_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_3bafb_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_3bafb_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_3bafb_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_3bafb_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_3bafb_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_3bafb_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_3bafb_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_3bafb_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_3bafb_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_3bafb_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_3bafb_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_3bafb_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_3bafb_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_3bafb_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_3bafb_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_3bafb_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_3bafb_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_3bafb_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_3bafb_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_3bafb_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_3bafb_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_3bafb_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_3bafb_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_3bafb_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3bafb_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_3bafb_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_3bafb_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_3bafb_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_3bafb_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_3bafb_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_3bafb_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a71820>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数字类型按列背景渐变\n",
    "df[:10].style.background_gradient()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_8972f_row0_col2{\n",
       "            background-color:  #023f64;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row0_col3{\n",
       "            background-color:  #83afd3;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row0_col4{\n",
       "            background-color:  #94b6d7;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row0_col5{\n",
       "            background-color:  #04639b;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row1_col2,#T_8972f_row1_col3{\n",
       "            background-color:  #4e9ac6;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row1_col4{\n",
       "            background-color:  #69a5cc;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row1_col5{\n",
       "            background-color:  #056dab;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row2_col2{\n",
       "            background-color:  #0c74b2;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row2_col3{\n",
       "            background-color:  #0872b1;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row2_col4,#T_8972f_row6_col5,#T_8972f_row7_col2,#T_8972f_row9_col3{\n",
       "            background-color:  #a5bddb;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row2_col5{\n",
       "            background-color:  #023c5f;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row3_col2,#T_8972f_row3_col3,#T_8972f_row4_col5,#T_8972f_row7_col4{\n",
       "            background-color:  #023858;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row3_col4,#T_8972f_row8_col2{\n",
       "            background-color:  #056aa6;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row3_col5{\n",
       "            background-color:  #034973;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row4_col2{\n",
       "            background-color:  #0569a4;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row4_col3{\n",
       "            background-color:  #2786bb;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row4_col4{\n",
       "            background-color:  #167bb6;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row5_col2{\n",
       "            background-color:  #79abd0;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row5_col3{\n",
       "            background-color:  #9ab8d8;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row5_col4{\n",
       "            background-color:  #03517e;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row5_col5{\n",
       "            background-color:  #2a88bc;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row6_col2{\n",
       "            background-color:  #056dac;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row6_col3{\n",
       "            background-color:  #02395a;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row6_col4{\n",
       "            background-color:  #034267;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row7_col3{\n",
       "            background-color:  #a4bcda;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row7_col5{\n",
       "            background-color:  #3f93c2;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row8_col3{\n",
       "            background-color:  #023d60;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row8_col4{\n",
       "            background-color:  #2182b9;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row8_col5{\n",
       "            background-color:  #045687;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row9_col2{\n",
       "            background-color:  #04588a;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_8972f_row9_col4{\n",
       "            background-color:  #8eb3d5;\n",
       "            color:  #000000;\n",
       "        }#T_8972f_row9_col5{\n",
       "            background-color:  #045e94;\n",
       "            color:  #f1f1f1;\n",
       "        }</style><table id=\"T_8972f_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_8972f_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_8972f_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_8972f_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_8972f_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_8972f_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_8972f_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_8972f_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_8972f_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_8972f_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_8972f_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_8972f_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_8972f_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_8972f_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_8972f_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_8972f_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_8972f_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_8972f_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_8972f_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_8972f_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_8972f_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_8972f_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_8972f_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_8972f_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_8972f_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_8972f_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_8972f_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_8972f_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_8972f_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_8972f_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_8972f_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_8972f_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_8972f_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_8972f_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_8972f_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_8972f_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_8972f_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_8972f_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_8972f_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_8972f_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_8972f_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_8972f_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_8972f_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_8972f_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_8972f_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_8972f_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_8972f_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_8972f_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_8972f_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_8972f_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_8972f_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_8972f_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_8972f_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_8972f_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_8972f_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_8972f_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8972f_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_8972f_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_8972f_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_8972f_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_8972f_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_8972f_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_8972f_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a5f7c0>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 低百分比和高百分比范围, 更换颜色时避免使用所有色域\n",
    "df[:10].style.background_gradient(low=0.6, high=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_f67d0_row0_col2{\n",
       "            background-color:  #03456c;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row0_col3{\n",
       "            background-color:  #e9e5f1;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row0_col4{\n",
       "            background-color:  #f4eef6;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row0_col5{\n",
       "            background-color:  #1278b4;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row1_col2,#T_f67d0_row1_col3{\n",
       "            background-color:  #b8c6e0;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row1_col4{\n",
       "            background-color:  #d3d4e7;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row1_col5{\n",
       "            background-color:  #358fc0;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row2_col2{\n",
       "            background-color:  #509ac6;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row2_col3{\n",
       "            background-color:  #4897c4;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row2_col4,#T_f67d0_row6_col5,#T_f67d0_row7_col2,#T_f67d0_row9_col3{\n",
       "            background-color:  #fff7fb;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row2_col5{\n",
       "            background-color:  #023e62;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row3_col2,#T_f67d0_row3_col3,#T_f67d0_row4_col5,#T_f67d0_row7_col4{\n",
       "            background-color:  #023858;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row3_col4,#T_f67d0_row8_col2{\n",
       "            background-color:  #2a88bc;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row3_col5{\n",
       "            background-color:  #045483;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row4_col2{\n",
       "            background-color:  #2685bb;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row4_col3{\n",
       "            background-color:  #84b0d3;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row4_col4{\n",
       "            background-color:  #65a3cb;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row5_col2{\n",
       "            background-color:  #e0deed;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row5_col3{\n",
       "            background-color:  #f8f1f8;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row5_col4{\n",
       "            background-color:  #045e93;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row5_col5{\n",
       "            background-color:  #89b1d4;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row6_col2{\n",
       "            background-color:  #3991c1;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row6_col3{\n",
       "            background-color:  #023a5b;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row6_col4{\n",
       "            background-color:  #034871;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row7_col3{\n",
       "            background-color:  #fef6fa;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row7_col5{\n",
       "            background-color:  #a7bddb;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row8_col3{\n",
       "            background-color:  #034165;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row8_col4{\n",
       "            background-color:  #7bacd1;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row8_col5{\n",
       "            background-color:  #04639b;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row9_col2{\n",
       "            background-color:  #05659f;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_f67d0_row9_col4{\n",
       "            background-color:  #f0eaf4;\n",
       "            color:  #000000;\n",
       "        }#T_f67d0_row9_col5{\n",
       "            background-color:  #056fae;\n",
       "            color:  #f1f1f1;\n",
       "        }</style><table id=\"T_f67d0_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_f67d0_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_f67d0_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_f67d0_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_f67d0_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_f67d0_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_f67d0_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_f67d0_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_f67d0_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_f67d0_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_f67d0_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_f67d0_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_f67d0_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_f67d0_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_f67d0_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_f67d0_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_f67d0_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_f67d0_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_f67d0_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_f67d0_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_f67d0_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_f67d0_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_f67d0_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_f67d0_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_f67d0_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_f67d0_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_f67d0_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_f67d0_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_f67d0_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_f67d0_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_f67d0_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_f67d0_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_f67d0_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_f67d0_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_f67d0_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_f67d0_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_f67d0_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_f67d0_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_f67d0_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_f67d0_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_f67d0_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_f67d0_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_f67d0_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_f67d0_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_f67d0_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_f67d0_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_f67d0_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_f67d0_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_f67d0_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_f67d0_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_f67d0_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_f67d0_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_f67d0_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_f67d0_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_f67d0_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_f67d0_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_f67d0_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_f67d0_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_f67d0_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_f67d0_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_f67d0_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_f67d0_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_f67d0_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a53a60>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 内容的颜色，取 0-1（深色到浅色），方便突显出文本\n",
    "df[:10].style.background_gradient(text_color_threshold=0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_62542_row0_col2{\n",
       "            background-color:  #0f76b3;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_62542_row0_col3,#T_62542_row0_col4,#T_62542_row1_col2,#T_62542_row1_col3,#T_62542_row1_col4,#T_62542_row1_col5,#T_62542_row2_col2,#T_62542_row2_col3,#T_62542_row2_col4,#T_62542_row4_col3,#T_62542_row5_col2,#T_62542_row5_col3,#T_62542_row5_col5,#T_62542_row6_col5,#T_62542_row7_col2,#T_62542_row7_col3,#T_62542_row7_col5,#T_62542_row8_col4,#T_62542_row9_col3,#T_62542_row9_col4{\n",
       "            background-color:  #fff7fb;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row0_col5,#T_62542_row8_col2{\n",
       "            background-color:  #f0eaf4;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row2_col5{\n",
       "            background-color:  #4295c3;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row3_col2,#T_62542_row8_col3{\n",
       "            background-color:  #04629a;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_62542_row3_col3{\n",
       "            background-color:  #045382;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_62542_row3_col4{\n",
       "            background-color:  #c8cde4;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row3_col5{\n",
       "            background-color:  #88b1d4;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row4_col2{\n",
       "            background-color:  #ece7f2;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row4_col4,#T_62542_row6_col2{\n",
       "            background-color:  #fbf4f9;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row4_col5{\n",
       "            background-color:  #2c89bd;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row5_col4{\n",
       "            background-color:  #2383ba;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row6_col3{\n",
       "            background-color:  #04598c;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_62542_row6_col4{\n",
       "            background-color:  #045e94;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_62542_row7_col4{\n",
       "            background-color:  #023e62;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_62542_row8_col5{\n",
       "            background-color:  #c0c9e2;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row9_col2{\n",
       "            background-color:  #93b5d6;\n",
       "            color:  #000000;\n",
       "        }#T_62542_row9_col5{\n",
       "            background-color:  #e1dfed;\n",
       "            color:  #000000;\n",
       "        }</style><table id=\"T_62542_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_62542_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_62542_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_62542_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_62542_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_62542_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_62542_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_62542_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_62542_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_62542_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_62542_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_62542_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_62542_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_62542_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_62542_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_62542_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_62542_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_62542_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_62542_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_62542_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_62542_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_62542_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_62542_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_62542_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_62542_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_62542_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_62542_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_62542_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_62542_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_62542_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_62542_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_62542_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_62542_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_62542_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_62542_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_62542_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_62542_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_62542_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_62542_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_62542_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_62542_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_62542_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_62542_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_62542_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_62542_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_62542_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_62542_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_62542_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_62542_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_62542_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_62542_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_62542_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_62542_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_62542_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_62542_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_62542_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_62542_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_62542_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_62542_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_62542_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_62542_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_62542_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_62542_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a57b50>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 颜色应用的取值范围，不在这个范围的不应用\n",
    "df[:10].style.background_gradient(vmin=60, vmax=100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "以下是一个综合使用示例："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_1d080_row0_col2{\n",
       "            background-color:  #fff30c;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row0_col3,#T_1d080_row1_col3,#T_1d080_row2_col3,#T_1d080_row4_col3,#T_1d080_row5_col3,#T_1d080_row6_col5,#T_1d080_row7_col3,#T_1d080_row9_col3,#T_1d080_row10_col3,#T_1d080_row14_col3{\n",
       "            background-color:  #fff7fb;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row0_col4{\n",
       "            background-color:  #94b6d7;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row0_col5{\n",
       "            background-color:  #1278b4;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row1_col2{\n",
       "            background-color:  #ff52ad;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row1_col4{\n",
       "            background-color:  #69a5cc;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row1_col5{\n",
       "            background-color:  #358fc0;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row2_col2{\n",
       "            background-color:  #ff926d;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row2_col4{\n",
       "            background-color:  #a5bddb;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row2_col5{\n",
       "            background-color:  #023e62;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row3_col2{\n",
       "            background-color:  #ffff00;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row3_col3{\n",
       "            background-color:  #045382;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row3_col4{\n",
       "            background-color:  #056aa6;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row3_col5{\n",
       "            background-color:  #045483;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row4_col2{\n",
       "            background-color:  #ffaa55;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row4_col4{\n",
       "            background-color:  #167bb6;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row4_col5,#T_1d080_row7_col4{\n",
       "            background-color:  #023858;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row5_col2{\n",
       "            background-color:  #ff2dd2;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row5_col4,#T_1d080_row13_col4{\n",
       "            background-color:  #03517e;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row5_col5{\n",
       "            background-color:  #89b1d4;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row6_col2{\n",
       "            background-color:  #ff9e61;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row6_col3{\n",
       "            background-color:  #04598c;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row6_col4{\n",
       "            background-color:  #034267;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row7_col2,#T_1d080_row11_col2{\n",
       "            background-color:  #ff00ff;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row7_col5{\n",
       "            background-color:  #a7bddb;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row8_col2{\n",
       "            background-color:  #ffa758;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row8_col3{\n",
       "            background-color:  #04629a;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row8_col4{\n",
       "            background-color:  #2182b9;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row8_col5{\n",
       "            background-color:  #04639b;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row9_col2{\n",
       "            background-color:  #ffcf30;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row9_col4{\n",
       "            background-color:  #8eb3d5;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row9_col5{\n",
       "            background-color:  #056fae;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row10_col2{\n",
       "            background-color:  #ff18e7;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row10_col4{\n",
       "            background-color:  #78abd0;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row10_col5{\n",
       "            background-color:  #034f7d;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row11_col3,#T_1d080_row12_col3{\n",
       "            background-color:  #0f76b3;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row11_col4{\n",
       "            background-color:  #71a8ce;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row11_col5{\n",
       "            background-color:  #0c74b2;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row12_col2{\n",
       "            background-color:  #ffe11e;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row12_col4{\n",
       "            background-color:  #1c7fb8;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row12_col5{\n",
       "            background-color:  #056dab;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row13_col2{\n",
       "            background-color:  #ff807f;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row13_col3{\n",
       "            background-color:  #2c89bd;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row13_col5{\n",
       "            background-color:  #d2d2e7;\n",
       "            color:  #f1f1f1;\n",
       "        }#T_1d080_row14_col2{\n",
       "            background-color:  #ffd827;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row14_col4{\n",
       "            background-color:  #2484ba;\n",
       "            color:  #000000;\n",
       "        }#T_1d080_row14_col5{\n",
       "            background-color:  #93b5d6;\n",
       "            color:  #f1f1f1;\n",
       "        }</style><table id=\"T_1d080_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_1d080_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_1d080_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_1d080_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_1d080_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_1d080_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_1d080_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_1d080_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_1d080_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_1d080_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_1d080_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_1d080_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_1d080_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_1d080_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_1d080_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_1d080_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_1d080_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_1d080_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_1d080_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_1d080_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_1d080_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_1d080_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_1d080_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_1d080_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_1d080_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_1d080_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_1d080_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_1d080_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_1d080_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_1d080_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_1d080_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_1d080_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_1d080_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_1d080_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_1d080_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_1d080_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_1d080_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_1d080_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_1d080_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_1d080_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_1d080_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_1d080_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_1d080_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_1d080_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_1d080_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_1d080_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_1d080_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_1d080_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_1d080_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_1d080_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_1d080_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_1d080_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_1d080_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_1d080_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_1d080_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_1d080_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_1d080_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_1d080_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_1d080_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_1d080_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_1d080_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_1d080_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n",
       "                        <td id=\"T_1d080_row10_col0\" class=\"data row10 col0\" >Leo</td>\n",
       "                        <td id=\"T_1d080_row10_col1\" class=\"data row10 col1\" >B</td>\n",
       "                        <td id=\"T_1d080_row10_col2\" class=\"data row10 col2\" >17</td>\n",
       "                        <td id=\"T_1d080_row10_col3\" class=\"data row10 col3\" >4</td>\n",
       "                        <td id=\"T_1d080_row10_col4\" class=\"data row10 col4\" >33</td>\n",
       "                        <td id=\"T_1d080_row10_col5\" class=\"data row10 col5\" >79</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row11\" class=\"row_heading level0 row11\" >11</th>\n",
       "                        <td id=\"T_1d080_row11_col0\" class=\"data row11 col0\" >Logan</td>\n",
       "                        <td id=\"T_1d080_row11_col1\" class=\"data row11 col1\" >B</td>\n",
       "                        <td id=\"T_1d080_row11_col2\" class=\"data row11 col2\" >9</td>\n",
       "                        <td id=\"T_1d080_row11_col3\" class=\"data row11 col3\" >89</td>\n",
       "                        <td id=\"T_1d080_row11_col4\" class=\"data row11 col4\" >35</td>\n",
       "                        <td id=\"T_1d080_row11_col5\" class=\"data row11 col5\" >65</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row12\" class=\"row_heading level0 row12\" >12</th>\n",
       "                        <td id=\"T_1d080_row12_col0\" class=\"data row12 col0\" >Archie</td>\n",
       "                        <td id=\"T_1d080_row12_col1\" class=\"data row12 col1\" >C</td>\n",
       "                        <td id=\"T_1d080_row12_col2\" class=\"data row12 col2\" >83</td>\n",
       "                        <td id=\"T_1d080_row12_col3\" class=\"data row12 col3\" >89</td>\n",
       "                        <td id=\"T_1d080_row12_col4\" class=\"data row12 col4\" >59</td>\n",
       "                        <td id=\"T_1d080_row12_col5\" class=\"data row12 col5\" >68</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row13\" class=\"row_heading level0 row13\" >13</th>\n",
       "                        <td id=\"T_1d080_row13_col0\" class=\"data row13 col0\" >Theo</td>\n",
       "                        <td id=\"T_1d080_row13_col1\" class=\"data row13 col1\" >C</td>\n",
       "                        <td id=\"T_1d080_row13_col2\" class=\"data row13 col2\" >51</td>\n",
       "                        <td id=\"T_1d080_row13_col3\" class=\"data row13 col3\" >86</td>\n",
       "                        <td id=\"T_1d080_row13_col4\" class=\"data row13 col4\" >87</td>\n",
       "                        <td id=\"T_1d080_row13_col5\" class=\"data row13 col5\" >27</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_1d080_level0_row14\" class=\"row_heading level0 row14\" >14</th>\n",
       "                        <td id=\"T_1d080_row14_col0\" class=\"data row14 col0\" >Thomas</td>\n",
       "                        <td id=\"T_1d080_row14_col1\" class=\"data row14 col1\" >B</td>\n",
       "                        <td id=\"T_1d080_row14_col2\" class=\"data row14 col2\" >80</td>\n",
       "                        <td id=\"T_1d080_row14_col3\" class=\"data row14 col3\" >48</td>\n",
       "                        <td id=\"T_1d080_row14_col4\" class=\"data row14 col4\" >56</td>\n",
       "                        <td id=\"T_1d080_row14_col5\" class=\"data row14 col5\" >41</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a749a0>"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 链式方法使用样式\n",
    "(df.head(15)\n",
    " .style\n",
    " .background_gradient(subset=['Q1'], cmap='spring') # 指定色系\n",
    " .background_gradient(subset=['Q2'], vmin=60, vmax=100) # 指定应用值区间\n",
    " .background_gradient(subset=['Q3'], low=0.6, high=0) # 高低百分比范围\n",
    " .background_gradient(subset=['Q4'], text_color_threshold=0.9) # 文本色深\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 条形图 bar\n",
    "条形图在表格里一般以横向柱状图的形式代表这个值的大小。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_a9bf7_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 95.2%, transparent 95.2%);\n",
       "        }#T_a9bf7_row0_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 13.8%, transparent 13.8%);\n",
       "        }#T_a9bf7_row0_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 7.4%, transparent 7.4%);\n",
       "        }#T_a9bf7_row0_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 71.8%, transparent 71.8%);\n",
       "        }#T_a9bf7_row1_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 32.1%, transparent 32.1%);\n",
       "        }#T_a9bf7_row1_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 32.2%, transparent 32.2%);\n",
       "        }#T_a9bf7_row1_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 23.5%, transparent 23.5%);\n",
       "        }#T_a9bf7_row1_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 62.8%, transparent 62.8%);\n",
       "        }#T_a9bf7_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 57.1%, transparent 57.1%);\n",
       "        }#T_a9bf7_row2_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 58.6%, transparent 58.6%);\n",
       "        }#T_a9bf7_row2_col4,#T_a9bf7_row6_col5,#T_a9bf7_row7_col2,#T_a9bf7_row9_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_a9bf7_row2_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 97.4%, transparent 97.4%);\n",
       "        }#T_a9bf7_row3_col2,#T_a9bf7_row3_col3,#T_a9bf7_row4_col5,#T_a9bf7_row7_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 100.0%, transparent 100.0%);\n",
       "        }#T_a9bf7_row3_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 65.4%, transparent 65.4%);\n",
       "        }#T_a9bf7_row3_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 89.7%, transparent 89.7%);\n",
       "        }#T_a9bf7_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 66.7%, transparent 66.7%);\n",
       "        }#T_a9bf7_row4_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 46.0%, transparent 46.0%);\n",
       "        }#T_a9bf7_row4_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 53.1%, transparent 53.1%);\n",
       "        }#T_a9bf7_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 17.9%, transparent 17.9%);\n",
       "        }#T_a9bf7_row5_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 4.6%, transparent 4.6%);\n",
       "        }#T_a9bf7_row5_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 85.2%, transparent 85.2%);\n",
       "        }#T_a9bf7_row5_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 44.9%, transparent 44.9%);\n",
       "        }#T_a9bf7_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 61.9%, transparent 61.9%);\n",
       "        }#T_a9bf7_row6_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 98.9%, transparent 98.9%);\n",
       "        }#T_a9bf7_row6_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 93.8%, transparent 93.8%);\n",
       "        }#T_a9bf7_row7_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 1.1%, transparent 1.1%);\n",
       "        }#T_a9bf7_row7_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 37.2%, transparent 37.2%);\n",
       "        }#T_a9bf7_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 65.5%, transparent 65.5%);\n",
       "        }#T_a9bf7_row8_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 96.6%, transparent 96.6%);\n",
       "        }#T_a9bf7_row8_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 48.1%, transparent 48.1%);\n",
       "        }#T_a9bf7_row8_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 82.1%, transparent 82.1%);\n",
       "        }#T_a9bf7_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 81.0%, transparent 81.0%);\n",
       "        }#T_a9bf7_row9_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 9.9%, transparent 9.9%);\n",
       "        }#T_a9bf7_row9_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 75.6%, transparent 75.6%);\n",
       "        }</style><table id=\"T_a9bf7_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_a9bf7_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_a9bf7_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_a9bf7_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_a9bf7_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_a9bf7_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_a9bf7_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_a9bf7_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_a9bf7_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_a9bf7_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_a9bf7_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_a9bf7_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_a9bf7_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_a9bf7_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_a9bf7_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_a9bf7_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_a9bf7_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_a9bf7_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_a9bf7_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_a9bf7_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_a9bf7_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_a9bf7_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_a9bf7_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_a9bf7_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_a9bf7_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_a9bf7_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_a9bf7_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_a9bf7_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_a9bf7_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_a9bf7_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_a9bf7_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_a9bf7_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_a9bf7_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_a9bf7_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_a9bf7_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_a9bf7_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_a9bf7_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_a9bf7_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_a9bf7_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_a9bf7_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_a9bf7_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_a9bf7_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_a9bf7_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_a9bf7_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_a9bf7_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_a9bf7_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_a9bf7_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_a9bf7_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_a9bf7_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_a9bf7_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_a9bf7_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_a9bf7_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_a9bf7_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_a9bf7_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_a9bf7_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a9bf7_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_a9bf7_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_a9bf7_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_a9bf7_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_a9bf7_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_a9bf7_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_a9bf7_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a8ca00>"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 基本使用，默认将数字应用\n",
    "df[:10].style.bar()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_7b3b6_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 95.2%, transparent 95.2%);\n",
       "        }#T_7b3b6_row0_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 13.8%, transparent 13.8%);\n",
       "        }#T_7b3b6_row1_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 32.1%, transparent 32.1%);\n",
       "        }#T_7b3b6_row1_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 32.2%, transparent 32.2%);\n",
       "        }#T_7b3b6_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 57.1%, transparent 57.1%);\n",
       "        }#T_7b3b6_row2_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 58.6%, transparent 58.6%);\n",
       "        }#T_7b3b6_row3_col2,#T_7b3b6_row3_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 100.0%, transparent 100.0%);\n",
       "        }#T_7b3b6_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 66.7%, transparent 66.7%);\n",
       "        }#T_7b3b6_row4_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 46.0%, transparent 46.0%);\n",
       "        }#T_7b3b6_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 17.9%, transparent 17.9%);\n",
       "        }#T_7b3b6_row5_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 4.6%, transparent 4.6%);\n",
       "        }#T_7b3b6_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 61.9%, transparent 61.9%);\n",
       "        }#T_7b3b6_row6_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 98.9%, transparent 98.9%);\n",
       "        }#T_7b3b6_row7_col2,#T_7b3b6_row9_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_7b3b6_row7_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 1.1%, transparent 1.1%);\n",
       "        }#T_7b3b6_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 65.5%, transparent 65.5%);\n",
       "        }#T_7b3b6_row8_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 96.6%, transparent 96.6%);\n",
       "        }#T_7b3b6_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 81.0%, transparent 81.0%);\n",
       "        }</style><table id=\"T_7b3b6_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_7b3b6_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_7b3b6_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_7b3b6_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_7b3b6_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_7b3b6_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_7b3b6_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_7b3b6_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_7b3b6_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_7b3b6_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_7b3b6_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_7b3b6_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_7b3b6_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_7b3b6_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_7b3b6_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_7b3b6_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_7b3b6_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_7b3b6_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_7b3b6_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_7b3b6_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_7b3b6_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_7b3b6_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_7b3b6_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_7b3b6_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_7b3b6_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_7b3b6_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_7b3b6_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_7b3b6_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_7b3b6_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_7b3b6_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_7b3b6_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_7b3b6_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_7b3b6_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_7b3b6_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_7b3b6_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_7b3b6_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_7b3b6_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_7b3b6_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_7b3b6_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_7b3b6_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_7b3b6_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_7b3b6_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_7b3b6_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_7b3b6_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_7b3b6_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_7b3b6_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_7b3b6_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_7b3b6_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_7b3b6_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_7b3b6_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_7b3b6_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_7b3b6_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_7b3b6_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_7b3b6_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_7b3b6_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7b3b6_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_7b3b6_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_7b3b6_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_7b3b6_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_7b3b6_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_7b3b6_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_7b3b6_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a95580>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 指定应用范围\n",
    "df[:10].style.bar(subset=['Q1', 'Q2'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_dd03a_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 95.2%, transparent 95.2%);\n",
       "        }#T_dd03a_row0_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 13.8%, transparent 13.8%);\n",
       "        }#T_dd03a_row0_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 7.4%, transparent 7.4%);\n",
       "        }#T_dd03a_row0_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 71.8%, transparent 71.8%);\n",
       "        }#T_dd03a_row1_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 32.1%, transparent 32.1%);\n",
       "        }#T_dd03a_row1_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 32.2%, transparent 32.2%);\n",
       "        }#T_dd03a_row1_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 23.5%, transparent 23.5%);\n",
       "        }#T_dd03a_row1_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 62.8%, transparent 62.8%);\n",
       "        }#T_dd03a_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 57.1%, transparent 57.1%);\n",
       "        }#T_dd03a_row2_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 58.6%, transparent 58.6%);\n",
       "        }#T_dd03a_row2_col4,#T_dd03a_row6_col5,#T_dd03a_row7_col2,#T_dd03a_row9_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_dd03a_row2_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 97.4%, transparent 97.4%);\n",
       "        }#T_dd03a_row3_col2,#T_dd03a_row3_col3,#T_dd03a_row4_col5,#T_dd03a_row7_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 100.0%, transparent 100.0%);\n",
       "        }#T_dd03a_row3_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 65.4%, transparent 65.4%);\n",
       "        }#T_dd03a_row3_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 89.7%, transparent 89.7%);\n",
       "        }#T_dd03a_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 66.7%, transparent 66.7%);\n",
       "        }#T_dd03a_row4_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 46.0%, transparent 46.0%);\n",
       "        }#T_dd03a_row4_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 53.1%, transparent 53.1%);\n",
       "        }#T_dd03a_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 17.9%, transparent 17.9%);\n",
       "        }#T_dd03a_row5_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 4.6%, transparent 4.6%);\n",
       "        }#T_dd03a_row5_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 85.2%, transparent 85.2%);\n",
       "        }#T_dd03a_row5_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 44.9%, transparent 44.9%);\n",
       "        }#T_dd03a_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 61.9%, transparent 61.9%);\n",
       "        }#T_dd03a_row6_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 98.9%, transparent 98.9%);\n",
       "        }#T_dd03a_row6_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 93.8%, transparent 93.8%);\n",
       "        }#T_dd03a_row7_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 1.1%, transparent 1.1%);\n",
       "        }#T_dd03a_row7_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 37.2%, transparent 37.2%);\n",
       "        }#T_dd03a_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 65.5%, transparent 65.5%);\n",
       "        }#T_dd03a_row8_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 96.6%, transparent 96.6%);\n",
       "        }#T_dd03a_row8_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 48.1%, transparent 48.1%);\n",
       "        }#T_dd03a_row8_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 82.1%, transparent 82.1%);\n",
       "        }#T_dd03a_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 81.0%, transparent 81.0%);\n",
       "        }#T_dd03a_row9_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 9.9%, transparent 9.9%);\n",
       "        }#T_dd03a_row9_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,green 75.6%, transparent 75.6%);\n",
       "        }</style><table id=\"T_dd03a_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_dd03a_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_dd03a_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_dd03a_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_dd03a_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_dd03a_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_dd03a_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_dd03a_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_dd03a_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_dd03a_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_dd03a_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_dd03a_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_dd03a_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_dd03a_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_dd03a_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_dd03a_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_dd03a_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_dd03a_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_dd03a_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_dd03a_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_dd03a_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_dd03a_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_dd03a_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_dd03a_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_dd03a_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_dd03a_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_dd03a_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_dd03a_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_dd03a_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_dd03a_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_dd03a_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_dd03a_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_dd03a_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_dd03a_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_dd03a_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_dd03a_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_dd03a_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_dd03a_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_dd03a_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_dd03a_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_dd03a_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_dd03a_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_dd03a_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_dd03a_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_dd03a_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_dd03a_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_dd03a_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_dd03a_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_dd03a_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_dd03a_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_dd03a_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_dd03a_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_dd03a_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_dd03a_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_dd03a_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_dd03a_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dd03a_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_dd03a_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_dd03a_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_dd03a_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_dd03a_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_dd03a_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_dd03a_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a31580>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 定义颜色\n",
    "df[:10].style.bar(color='green')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_e89c3_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 95.2%, transparent 95.2%);\n",
       "        }#T_e89c3_row0_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 13.8%, transparent 13.8%);\n",
       "        }#T_e89c3_row0_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 7.4%, transparent 7.4%);\n",
       "        }#T_e89c3_row0_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 71.8%, transparent 71.8%);\n",
       "        }#T_e89c3_row1_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 32.1%, transparent 32.1%);\n",
       "        }#T_e89c3_row1_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 32.2%, transparent 32.2%);\n",
       "        }#T_e89c3_row1_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 23.5%, transparent 23.5%);\n",
       "        }#T_e89c3_row1_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 62.8%, transparent 62.8%);\n",
       "        }#T_e89c3_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 57.1%, transparent 57.1%);\n",
       "        }#T_e89c3_row2_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 58.6%, transparent 58.6%);\n",
       "        }#T_e89c3_row2_col4,#T_e89c3_row6_col5,#T_e89c3_row7_col2,#T_e89c3_row9_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_e89c3_row2_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 97.4%, transparent 97.4%);\n",
       "        }#T_e89c3_row3_col2,#T_e89c3_row3_col3,#T_e89c3_row4_col5,#T_e89c3_row7_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 100.0%, transparent 100.0%);\n",
       "        }#T_e89c3_row3_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 65.4%, transparent 65.4%);\n",
       "        }#T_e89c3_row3_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 89.7%, transparent 89.7%);\n",
       "        }#T_e89c3_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 66.7%, transparent 66.7%);\n",
       "        }#T_e89c3_row4_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 46.0%, transparent 46.0%);\n",
       "        }#T_e89c3_row4_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 53.1%, transparent 53.1%);\n",
       "        }#T_e89c3_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 17.9%, transparent 17.9%);\n",
       "        }#T_e89c3_row5_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 4.6%, transparent 4.6%);\n",
       "        }#T_e89c3_row5_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 85.2%, transparent 85.2%);\n",
       "        }#T_e89c3_row5_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 44.9%, transparent 44.9%);\n",
       "        }#T_e89c3_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 61.9%, transparent 61.9%);\n",
       "        }#T_e89c3_row6_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 98.9%, transparent 98.9%);\n",
       "        }#T_e89c3_row6_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 93.8%, transparent 93.8%);\n",
       "        }#T_e89c3_row7_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 1.1%, transparent 1.1%);\n",
       "        }#T_e89c3_row7_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 37.2%, transparent 37.2%);\n",
       "        }#T_e89c3_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 65.5%, transparent 65.5%);\n",
       "        }#T_e89c3_row8_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 96.6%, transparent 96.6%);\n",
       "        }#T_e89c3_row8_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 48.1%, transparent 48.1%);\n",
       "        }#T_e89c3_row8_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 82.1%, transparent 82.1%);\n",
       "        }#T_e89c3_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 81.0%, transparent 81.0%);\n",
       "        }#T_e89c3_row9_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 9.9%, transparent 9.9%);\n",
       "        }#T_e89c3_row9_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#ff11bb 75.6%, transparent 75.6%);\n",
       "        }</style><table id=\"T_e89c3_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_e89c3_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_e89c3_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_e89c3_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_e89c3_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_e89c3_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_e89c3_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_e89c3_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_e89c3_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_e89c3_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_e89c3_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_e89c3_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_e89c3_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_e89c3_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_e89c3_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_e89c3_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_e89c3_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_e89c3_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_e89c3_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_e89c3_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_e89c3_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_e89c3_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_e89c3_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_e89c3_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_e89c3_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_e89c3_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_e89c3_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_e89c3_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_e89c3_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_e89c3_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_e89c3_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_e89c3_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_e89c3_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_e89c3_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_e89c3_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_e89c3_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_e89c3_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_e89c3_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_e89c3_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_e89c3_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_e89c3_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_e89c3_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_e89c3_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_e89c3_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_e89c3_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_e89c3_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_e89c3_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_e89c3_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_e89c3_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_e89c3_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_e89c3_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_e89c3_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_e89c3_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_e89c3_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_e89c3_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_e89c3_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e89c3_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_e89c3_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_e89c3_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_e89c3_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_e89c3_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_e89c3_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_e89c3_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a74d90>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:10].style.bar(color='#ff11bb')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_0dd72_row0_col2,#T_0dd72_row1_col5,#T_0dd72_row2_col5,#T_0dd72_row3_col3,#T_0dd72_row4_col5,#T_0dd72_row5_col4,#T_0dd72_row6_col3,#T_0dd72_row7_col4,#T_0dd72_row8_col3,#T_0dd72_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 100.0%, transparent 100.0%);\n",
       "        }#T_0dd72_row0_col3,#T_0dd72_row1_col2,#T_0dd72_row2_col4,#T_0dd72_row3_col4,#T_0dd72_row4_col3,#T_0dd72_row5_col3,#T_0dd72_row6_col5,#T_0dd72_row7_col2,#T_0dd72_row8_col4,#T_0dd72_row9_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_0dd72_row0_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 4.4%, transparent 4.4%);\n",
       "        }#T_0dd72_row0_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 63.2%, transparent 63.2%);\n",
       "        }#T_0dd72_row1_col3,#T_0dd72_row1_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 4.8%, transparent 4.8%);\n",
       "        }#T_0dd72_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 59.1%, transparent 59.1%);\n",
       "        }#T_0dd72_row2_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 63.6%, transparent 63.6%);\n",
       "        }#T_0dd72_row3_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 88.0%, transparent 88.0%);\n",
       "        }#T_0dd72_row3_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 28.0%, transparent 28.0%);\n",
       "        }#T_0dd72_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 43.2%, transparent 43.2%);\n",
       "        }#T_0dd72_row4_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 32.4%, transparent 32.4%);\n",
       "        }#T_0dd72_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 14.9%, transparent 14.9%);\n",
       "        }#T_0dd72_row5_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 40.5%, transparent 40.5%);\n",
       "        }#T_0dd72_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 60.9%, transparent 60.9%);\n",
       "        }#T_0dd72_row6_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 98.9%, transparent 98.9%);\n",
       "        }#T_0dd72_row7_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 1.1%, transparent 1.1%);\n",
       "        }#T_0dd72_row7_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 31.1%, transparent 31.1%);\n",
       "        }#T_0dd72_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 19.4%, transparent 19.4%);\n",
       "        }#T_0dd72_row8_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 41.7%, transparent 41.7%);\n",
       "        }#T_0dd72_row9_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 25.0%, transparent 25.0%);\n",
       "        }#T_0dd72_row9_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 85.3%, transparent 85.3%);\n",
       "        }</style><table id=\"T_0dd72_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_0dd72_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_0dd72_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_0dd72_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_0dd72_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_0dd72_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_0dd72_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_0dd72_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_0dd72_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_0dd72_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_0dd72_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_0dd72_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_0dd72_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_0dd72_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_0dd72_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_0dd72_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_0dd72_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_0dd72_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_0dd72_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_0dd72_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_0dd72_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_0dd72_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_0dd72_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_0dd72_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_0dd72_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_0dd72_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_0dd72_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_0dd72_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_0dd72_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_0dd72_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_0dd72_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_0dd72_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_0dd72_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_0dd72_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_0dd72_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_0dd72_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_0dd72_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_0dd72_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_0dd72_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_0dd72_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_0dd72_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_0dd72_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_0dd72_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_0dd72_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_0dd72_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_0dd72_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_0dd72_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_0dd72_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_0dd72_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_0dd72_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_0dd72_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_0dd72_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_0dd72_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_0dd72_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_0dd72_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_0dd72_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0dd72_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_0dd72_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_0dd72_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_0dd72_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_0dd72_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_0dd72_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_0dd72_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a109da520>"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 横向进行计算展示\n",
    "df[:10].style.bar(axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_13e48_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 76.2%, transparent 76.2%);\n",
       "        }#T_13e48_row0_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 11.0%, transparent 11.0%);\n",
       "        }#T_13e48_row0_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 5.9%, transparent 5.9%);\n",
       "        }#T_13e48_row0_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 57.4%, transparent 57.4%);\n",
       "        }#T_13e48_row1_col2,#T_13e48_row1_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 25.7%, transparent 25.7%);\n",
       "        }#T_13e48_row1_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 18.8%, transparent 18.8%);\n",
       "        }#T_13e48_row1_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 50.3%, transparent 50.3%);\n",
       "        }#T_13e48_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 45.7%, transparent 45.7%);\n",
       "        }#T_13e48_row2_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 46.9%, transparent 46.9%);\n",
       "        }#T_13e48_row2_col4,#T_13e48_row6_col5,#T_13e48_row7_col2,#T_13e48_row9_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_13e48_row2_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 77.9%, transparent 77.9%);\n",
       "        }#T_13e48_row3_col2,#T_13e48_row3_col3,#T_13e48_row4_col5,#T_13e48_row7_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 80.0%, transparent 80.0%);\n",
       "        }#T_13e48_row3_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 52.3%, transparent 52.3%);\n",
       "        }#T_13e48_row3_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 71.8%, transparent 71.8%);\n",
       "        }#T_13e48_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 53.3%, transparent 53.3%);\n",
       "        }#T_13e48_row4_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 36.8%, transparent 36.8%);\n",
       "        }#T_13e48_row4_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 42.5%, transparent 42.5%);\n",
       "        }#T_13e48_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 14.3%, transparent 14.3%);\n",
       "        }#T_13e48_row5_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 3.7%, transparent 3.7%);\n",
       "        }#T_13e48_row5_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 68.1%, transparent 68.1%);\n",
       "        }#T_13e48_row5_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 35.9%, transparent 35.9%);\n",
       "        }#T_13e48_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 49.5%, transparent 49.5%);\n",
       "        }#T_13e48_row6_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 79.1%, transparent 79.1%);\n",
       "        }#T_13e48_row6_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 75.1%, transparent 75.1%);\n",
       "        }#T_13e48_row7_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 0.9%, transparent 0.9%);\n",
       "        }#T_13e48_row7_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 29.7%, transparent 29.7%);\n",
       "        }#T_13e48_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 52.4%, transparent 52.4%);\n",
       "        }#T_13e48_row8_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 77.2%, transparent 77.2%);\n",
       "        }#T_13e48_row8_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 38.5%, transparent 38.5%);\n",
       "        }#T_13e48_row8_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 65.6%, transparent 65.6%);\n",
       "        }#T_13e48_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 64.8%, transparent 64.8%);\n",
       "        }#T_13e48_row9_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 7.9%, transparent 7.9%);\n",
       "        }#T_13e48_row9_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 60.5%, transparent 60.5%);\n",
       "        }</style><table id=\"T_13e48_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_13e48_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_13e48_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_13e48_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_13e48_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_13e48_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_13e48_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_13e48_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_13e48_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_13e48_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_13e48_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_13e48_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_13e48_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_13e48_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_13e48_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_13e48_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_13e48_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_13e48_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_13e48_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_13e48_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_13e48_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_13e48_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_13e48_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_13e48_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_13e48_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_13e48_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_13e48_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_13e48_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_13e48_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_13e48_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_13e48_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_13e48_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_13e48_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_13e48_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_13e48_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_13e48_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_13e48_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_13e48_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_13e48_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_13e48_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_13e48_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_13e48_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_13e48_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_13e48_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_13e48_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_13e48_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_13e48_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_13e48_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_13e48_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_13e48_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_13e48_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_13e48_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_13e48_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_13e48_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_13e48_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_13e48_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_13e48_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_13e48_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_13e48_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_13e48_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_13e48_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_13e48_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_13e48_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10aa8e50>"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 样式在格中的占位百分比，0-100, 100占满\n",
    "df[:10].style.bar(width=80)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_9f284_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 95.7%, transparent 95.7%);\n",
       "        }#T_9f284_row0_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 21.9%, transparent 21.9%);\n",
       "        }#T_9f284_row0_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 24.2%, transparent 24.2%);\n",
       "        }#T_9f284_row0_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 74.4%, transparent 74.4%);\n",
       "        }#T_9f284_row1_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 38.7%, transparent 38.7%);\n",
       "        }#T_9f284_row1_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 38.5%, transparent 38.5%);\n",
       "        }#T_9f284_row1_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 37.4%, transparent 37.4%);\n",
       "        }#T_9f284_row1_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 66.3%, transparent 66.3%);\n",
       "        }#T_9f284_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 61.3%, transparent 61.3%);\n",
       "        }#T_9f284_row2_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 62.5%, transparent 62.5%);\n",
       "        }#T_9f284_row2_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 18.2%, transparent 18.2%);\n",
       "        }#T_9f284_row2_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 97.7%, transparent 97.7%);\n",
       "        }#T_9f284_row3_col2,#T_9f284_row3_col3,#T_9f284_row4_col5,#T_9f284_row7_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 100.0%, transparent 100.0%);\n",
       "        }#T_9f284_row3_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 71.7%, transparent 71.7%);\n",
       "        }#T_9f284_row3_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 90.7%, transparent 90.7%);\n",
       "        }#T_9f284_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 69.9%, transparent 69.9%);\n",
       "        }#T_9f284_row4_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 51.0%, transparent 51.0%);\n",
       "        }#T_9f284_row4_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 61.6%, transparent 61.6%);\n",
       "        }#T_9f284_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 25.8%, transparent 25.8%);\n",
       "        }#T_9f284_row5_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 13.5%, transparent 13.5%);\n",
       "        }#T_9f284_row5_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 87.9%, transparent 87.9%);\n",
       "        }#T_9f284_row5_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 50.0%, transparent 50.0%);\n",
       "        }#T_9f284_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 65.6%, transparent 65.6%);\n",
       "        }#T_9f284_row6_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 99.0%, transparent 99.0%);\n",
       "        }#T_9f284_row6_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 94.9%, transparent 94.9%);\n",
       "        }#T_9f284_row6_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 9.3%, transparent 9.3%);\n",
       "        }#T_9f284_row7_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 9.7%, transparent 9.7%);\n",
       "        }#T_9f284_row7_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 10.4%, transparent 10.4%);\n",
       "        }#T_9f284_row7_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 43.0%, transparent 43.0%);\n",
       "        }#T_9f284_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 68.8%, transparent 68.8%);\n",
       "        }#T_9f284_row8_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 96.9%, transparent 96.9%);\n",
       "        }#T_9f284_row8_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 57.6%, transparent 57.6%);\n",
       "        }#T_9f284_row8_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 83.7%, transparent 83.7%);\n",
       "        }#T_9f284_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 82.8%, transparent 82.8%);\n",
       "        }#T_9f284_row9_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 9.4%, transparent 9.4%);\n",
       "        }#T_9f284_row9_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 26.3%, transparent 26.3%);\n",
       "        }#T_9f284_row9_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 77.9%, transparent 77.9%);\n",
       "        }</style><table id=\"T_9f284_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_9f284_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_9f284_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_9f284_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_9f284_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_9f284_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_9f284_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_9f284_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_9f284_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_9f284_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_9f284_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_9f284_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_9f284_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_9f284_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_9f284_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_9f284_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_9f284_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_9f284_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_9f284_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_9f284_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_9f284_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_9f284_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_9f284_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_9f284_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_9f284_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_9f284_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_9f284_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_9f284_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_9f284_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_9f284_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_9f284_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_9f284_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_9f284_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_9f284_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_9f284_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_9f284_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_9f284_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_9f284_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_9f284_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_9f284_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_9f284_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_9f284_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_9f284_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_9f284_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_9f284_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_9f284_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_9f284_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_9f284_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_9f284_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_9f284_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_9f284_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_9f284_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_9f284_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_9f284_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_9f284_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_9f284_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9f284_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_9f284_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_9f284_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_9f284_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_9f284_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_9f284_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_9f284_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a67790>"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 对齐方式：\n",
    "# ‘left’ 最小值开始,\n",
    "# ‘zero’ 0值在中间,\n",
    "# ’mid’  (max-min)/2 值在中间，负（正）值0在右（左）\n",
    "df[:10].style.bar(align='mid')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_ffc68_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 72.5%, transparent 72.5%);\n",
       "        }#T_ffc68_row0_col3,#T_ffc68_row0_col4,#T_ffc68_row1_col2,#T_ffc68_row1_col3,#T_ffc68_row1_col4,#T_ffc68_row1_col5,#T_ffc68_row2_col2,#T_ffc68_row2_col3,#T_ffc68_row2_col4,#T_ffc68_row4_col3,#T_ffc68_row5_col2,#T_ffc68_row5_col3,#T_ffc68_row5_col5,#T_ffc68_row6_col5,#T_ffc68_row7_col2,#T_ffc68_row7_col3,#T_ffc68_row7_col5,#T_ffc68_row8_col4,#T_ffc68_row9_col3,#T_ffc68_row9_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_ffc68_row0_col5,#T_ffc68_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 10.0%, transparent 10.0%);\n",
       "        }#T_ffc68_row2_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 60.0%, transparent 60.0%);\n",
       "        }#T_ffc68_row3_col2,#T_ffc68_row8_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 82.5%, transparent 82.5%);\n",
       "        }#T_ffc68_row3_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 90.0%, transparent 90.0%);\n",
       "        }#T_ffc68_row3_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 27.5%, transparent 27.5%);\n",
       "        }#T_ffc68_row3_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 45.0%, transparent 45.0%);\n",
       "        }#T_ffc68_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 12.5%, transparent 12.5%);\n",
       "        }#T_ffc68_row4_col4,#T_ffc68_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 2.5%, transparent 2.5%);\n",
       "        }#T_ffc68_row4_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 65.0%, transparent 65.0%);\n",
       "        }#T_ffc68_row5_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 67.5%, transparent 67.5%);\n",
       "        }#T_ffc68_row6_col3{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 87.5%, transparent 87.5%);\n",
       "        }#T_ffc68_row6_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 85.0%, transparent 85.0%);\n",
       "        }#T_ffc68_row7_col4{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 97.5%, transparent 97.5%);\n",
       "        }#T_ffc68_row8_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 30.0%, transparent 30.0%);\n",
       "        }#T_ffc68_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 42.5%, transparent 42.5%);\n",
       "        }#T_ffc68_row9_col5{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#d65f5f 17.5%, transparent 17.5%);\n",
       "        }</style><table id=\"T_ffc68_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_ffc68_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_ffc68_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_ffc68_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_ffc68_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_ffc68_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_ffc68_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_ffc68_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_ffc68_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_ffc68_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_ffc68_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_ffc68_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_ffc68_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_ffc68_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_ffc68_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_ffc68_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_ffc68_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_ffc68_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_ffc68_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_ffc68_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_ffc68_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_ffc68_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_ffc68_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_ffc68_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_ffc68_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_ffc68_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_ffc68_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_ffc68_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_ffc68_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_ffc68_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_ffc68_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_ffc68_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_ffc68_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_ffc68_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_ffc68_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_ffc68_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_ffc68_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_ffc68_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_ffc68_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_ffc68_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_ffc68_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_ffc68_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_ffc68_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_ffc68_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_ffc68_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_ffc68_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_ffc68_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_ffc68_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_ffc68_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_ffc68_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_ffc68_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_ffc68_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_ffc68_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_ffc68_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_ffc68_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_ffc68_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ffc68_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_ffc68_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_ffc68_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_ffc68_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_ffc68_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_ffc68_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_ffc68_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a5b6a0>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 大小基准值\n",
    "df[:10].style.bar(vmin=60, vmax=100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "以下是一个综合示例："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_a90c1_row0_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 95.2%, transparent 95.2%);\n",
       "        }#T_a90c1_row0_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 44.5%, transparent 44.5%);\n",
       "        }#T_a90c1_row1_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 32.1%, transparent 32.1%);\n",
       "        }#T_a90c1_row1_col6,#T_a90c1_row5_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 37.6%, transparent 37.6%);\n",
       "        }#T_a90c1_row1_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 37.1%, #ffe4e4 37.1%, #ffe4e4 50.0%, transparent 50.0%);\n",
       "        }#T_a90c1_row2_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 57.1%, transparent 57.1%);\n",
       "        }#T_a90c1_row2_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 49.3%, transparent 49.3%);\n",
       "        }#T_a90c1_row2_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 50.0%, #bbf9ce 50.0%, #bbf9ce 71.7%, transparent 71.7%);\n",
       "        }#T_a90c1_row3_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 100.0%, transparent 100.0%);\n",
       "        }#T_a90c1_row3_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 76.0%, transparent 76.0%);\n",
       "        }#T_a90c1_row3_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 50.0%, #bbf9ce 50.0%, #bbf9ce 99.6%, transparent 99.6%);\n",
       "        }#T_a90c1_row4_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 66.7%, transparent 66.7%);\n",
       "        }#T_a90c1_row4_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 58.7%, transparent 58.7%);\n",
       "        }#T_a90c1_row4_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 17.9%, #ffe4e4 17.9%, #ffe4e4 50.0%, transparent 50.0%);\n",
       "        }#T_a90c1_row5_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 17.9%, transparent 17.9%);\n",
       "        }#T_a90c1_row5_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 10.8%, #ffe4e4 10.8%, #ffe4e4 50.0%, transparent 50.0%);\n",
       "        }#T_a90c1_row6_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 61.9%, transparent 61.9%);\n",
       "        }#T_a90c1_row6_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 58.0%, transparent 58.0%);\n",
       "        }#T_a90c1_row6_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 50.0%, #bbf9ce 50.0%, #bbf9ce 87.9%, transparent 87.9%);\n",
       "        }#T_a90c1_row7_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "        }#T_a90c1_row7_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 34.9%, transparent 34.9%);\n",
       "        }#T_a90c1_row7_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 7.1%, #ffe4e4 7.1%, #ffe4e4 50.0%, transparent 50.0%);\n",
       "        }#T_a90c1_row8_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 65.5%, transparent 65.5%);\n",
       "        }#T_a90c1_row8_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 64.3%, transparent 64.3%);\n",
       "        }#T_a90c1_row8_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 50.0%, #bbf9ce 50.0%, #bbf9ce 100.0%, transparent 100.0%);\n",
       "        }#T_a90c1_row9_col2{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,yellow 81.0%, transparent 81.0%);\n",
       "        }#T_a90c1_row9_col6{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg,#5CADAD 40.3%, transparent 40.3%);\n",
       "        }#T_a90c1_row9_col7{\n",
       "            width:  10em;\n",
       "             height:  80%;\n",
       "            background:  linear-gradient(90deg, transparent 5.4%, #ffe4e4 5.4%, #ffe4e4 50.0%, transparent 50.0%);\n",
       "        }</style><table id=\"T_a90c1_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>        <th class=\"col_heading level0 col6\" >avg</th>        <th class=\"col_heading level0 col7\" >diff</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_a90c1_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_a90c1_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_a90c1_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_a90c1_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_a90c1_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_a90c1_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_a90c1_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "                        <td id=\"T_a90c1_row0_col6\" class=\"data row0 col6\" >49.500000</td>\n",
       "                        <td id=\"T_a90c1_row0_col7\" class=\"data row0 col7\" >nan</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_a90c1_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_a90c1_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_a90c1_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_a90c1_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_a90c1_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_a90c1_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "                        <td id=\"T_a90c1_row1_col6\" class=\"data row1 col6\" >41.750000</td>\n",
       "                        <td id=\"T_a90c1_row1_col7\" class=\"data row1 col7\" >-7.750000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_a90c1_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_a90c1_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_a90c1_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_a90c1_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_a90c1_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_a90c1_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "                        <td id=\"T_a90c1_row2_col6\" class=\"data row2 col6\" >54.750000</td>\n",
       "                        <td id=\"T_a90c1_row2_col7\" class=\"data row2 col7\" >13.000000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_a90c1_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_a90c1_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_a90c1_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_a90c1_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_a90c1_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_a90c1_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "                        <td id=\"T_a90c1_row3_col6\" class=\"data row3 col6\" >84.500000</td>\n",
       "                        <td id=\"T_a90c1_row3_col7\" class=\"data row3 col7\" >29.750000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_a90c1_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_a90c1_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_a90c1_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_a90c1_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_a90c1_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_a90c1_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "                        <td id=\"T_a90c1_row4_col6\" class=\"data row4 col6\" >65.250000</td>\n",
       "                        <td id=\"T_a90c1_row4_col7\" class=\"data row4 col7\" >-19.250000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_a90c1_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_a90c1_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_a90c1_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_a90c1_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_a90c1_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_a90c1_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "                        <td id=\"T_a90c1_row5_col6\" class=\"data row5 col6\" >41.750000</td>\n",
       "                        <td id=\"T_a90c1_row5_col7\" class=\"data row5 col7\" >-23.500000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_a90c1_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_a90c1_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_a90c1_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_a90c1_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_a90c1_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_a90c1_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "                        <td id=\"T_a90c1_row6_col6\" class=\"data row6 col6\" >64.500000</td>\n",
       "                        <td id=\"T_a90c1_row6_col7\" class=\"data row6 col7\" >22.750000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_a90c1_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_a90c1_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_a90c1_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_a90c1_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_a90c1_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_a90c1_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "                        <td id=\"T_a90c1_row7_col6\" class=\"data row7 col6\" >38.750000</td>\n",
       "                        <td id=\"T_a90c1_row7_col7\" class=\"data row7 col7\" >-25.750000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_a90c1_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_a90c1_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_a90c1_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_a90c1_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_a90c1_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_a90c1_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "                        <td id=\"T_a90c1_row8_col6\" class=\"data row8 col6\" >71.500000</td>\n",
       "                        <td id=\"T_a90c1_row8_col7\" class=\"data row8 col7\" >32.750000</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a90c1_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_a90c1_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_a90c1_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_a90c1_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_a90c1_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_a90c1_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_a90c1_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "                        <td id=\"T_a90c1_row9_col6\" class=\"data row9 col6\" >44.750000</td>\n",
       "                        <td id=\"T_a90c1_row9_col7\" class=\"data row9 col7\" >-26.750000</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a9b040>"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(df.head(10)\n",
    " .assign(avg=df.mean(axis=1, numeric_only=True)) # 增加平均值\n",
    " .assign(diff=lambda x: x.avg.diff()) # 和前位同学差值\n",
    " .style\n",
    " .bar(color='yellow', subset=['Q1'])\n",
    " .bar(subset=['avg'],\n",
    "      width=90,\n",
    "      align='mid',\n",
    "      vmin=60, vmax=100,\n",
    "      color='#5CADAD')\n",
    " .bar(subset=['diff'],\n",
    "      color=['#ffe4e4','#bbf9ce'], # 上涨下降的颜色\n",
    "      vmin=0, vmax=30, # 范围定以0为基准的上下30\n",
    "      align='zero') # 0 值居中\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第二部分：格式显示\n",
    "我们在最终输出数据查看时，需要对数据进行相应的格式化，常见的如加货币符号、加百分号、增加千分位等，目的是让计数更加场景化，明确列表一定的业务意义。\n",
    "\n",
    "Styler.format 是专门用来处理格式的方法。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 语法结构\n",
    "```python\n",
    "Styler.format(self, formatter,\n",
    "              subset=None,\n",
    "              na_rep: Union[str, NoneType]=None)\n",
    "```\n",
    "formatter （str, callable, dict or None）一般是一个字典，由列名和格式组成，也可以给一个函数来调用。\n",
    "\n",
    "关于字符的格式化，可参考 python 教程中的格式化字符串。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 用法\n",
    "```python\n",
    "# 百分号，类似 29.57%\n",
    "df[:10].style.format(\"{:.2%}\")\n",
    "# 指定列全变为大写\n",
    "df.style.format({'name': str.upper})\n",
    "# B 保留四位，D 两位小数并显示正负号\n",
    "df.style.format({'B': \"{:0<4.0f}\", 'D': '{:+.2f}'})\n",
    "# 应用 lambda\n",
    "df.style.format({\"B\": lambda x: \"±{:.2f}\".format(abs(x))})\n",
    "# 缺失值的显示格式\n",
    "df.style.format(\"{:.2%}\", na_rep=\"-\")\n",
    "# 处理内置样式函数的缺失值\n",
    "df.style.highlight_max().format(None, na_rep=\"-\")\n",
    "# 常用的格式\n",
    "{'a': '¥{0:,.0f}', # 货币符号\n",
    " 'b': '{:%Y-%m}', # 年月\n",
    " 'c': '{:.2%}',  # 百分号\n",
    " 'd': '{:,f}',  # 千分位\n",
    " 'e': str.upper} # 大写\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 综合案例"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_5c989_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>        <th class=\"col_heading level0 col6\" >avg</th>        <th class=\"col_heading level0 col7\" >diff</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_5c989_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_5c989_row0_col0\" class=\"data row0 col0\" >LIVER</td>\n",
       "                        <td id=\"T_5c989_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_5c989_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_5c989_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_5c989_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_5c989_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "                        <td id=\"T_5c989_row0_col6\" class=\"data row0 col6\" >49.50%</td>\n",
       "                        <td id=\"T_5c989_row0_col7\" class=\"data row0 col7\" >-</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_5c989_row1_col0\" class=\"data row1 col0\" >ARRY</td>\n",
       "                        <td id=\"T_5c989_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_5c989_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_5c989_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_5c989_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_5c989_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "                        <td id=\"T_5c989_row1_col6\" class=\"data row1 col6\" >41.75%</td>\n",
       "                        <td id=\"T_5c989_row1_col7\" class=\"data row1 col7\" >¥-0.08</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_5c989_row2_col0\" class=\"data row2 col0\" >ACK</td>\n",
       "                        <td id=\"T_5c989_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_5c989_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_5c989_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_5c989_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_5c989_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "                        <td id=\"T_5c989_row2_col6\" class=\"data row2 col6\" >54.75%</td>\n",
       "                        <td id=\"T_5c989_row2_col7\" class=\"data row2 col7\" >¥0.13</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_5c989_row3_col0\" class=\"data row3 col0\" >EORGE</td>\n",
       "                        <td id=\"T_5c989_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_5c989_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_5c989_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_5c989_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_5c989_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "                        <td id=\"T_5c989_row3_col6\" class=\"data row3 col6\" >84.50%</td>\n",
       "                        <td id=\"T_5c989_row3_col7\" class=\"data row3 col7\" >¥0.30</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_5c989_row4_col0\" class=\"data row4 col0\" >OAH</td>\n",
       "                        <td id=\"T_5c989_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_5c989_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_5c989_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_5c989_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_5c989_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "                        <td id=\"T_5c989_row4_col6\" class=\"data row4 col6\" >65.25%</td>\n",
       "                        <td id=\"T_5c989_row4_col7\" class=\"data row4 col7\" >¥-0.19</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_5c989_row5_col0\" class=\"data row5 col0\" >HARLIE</td>\n",
       "                        <td id=\"T_5c989_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_5c989_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_5c989_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_5c989_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_5c989_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "                        <td id=\"T_5c989_row5_col6\" class=\"data row5 col6\" >41.75%</td>\n",
       "                        <td id=\"T_5c989_row5_col7\" class=\"data row5 col7\" >¥-0.23</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_5c989_row6_col0\" class=\"data row6 col0\" >ACOB</td>\n",
       "                        <td id=\"T_5c989_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_5c989_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_5c989_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_5c989_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_5c989_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "                        <td id=\"T_5c989_row6_col6\" class=\"data row6 col6\" >64.50%</td>\n",
       "                        <td id=\"T_5c989_row6_col7\" class=\"data row6 col7\" >¥0.23</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_5c989_row7_col0\" class=\"data row7 col0\" >LFIE</td>\n",
       "                        <td id=\"T_5c989_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_5c989_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_5c989_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_5c989_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_5c989_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "                        <td id=\"T_5c989_row7_col6\" class=\"data row7 col6\" >38.75%</td>\n",
       "                        <td id=\"T_5c989_row7_col7\" class=\"data row7 col7\" >¥-0.26</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_5c989_row8_col0\" class=\"data row8 col0\" >REDDIE</td>\n",
       "                        <td id=\"T_5c989_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_5c989_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_5c989_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_5c989_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_5c989_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "                        <td id=\"T_5c989_row8_col6\" class=\"data row8 col6\" >71.50%</td>\n",
       "                        <td id=\"T_5c989_row8_col7\" class=\"data row8 col7\" >¥0.33</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5c989_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_5c989_row9_col0\" class=\"data row9 col0\" >OSCAR</td>\n",
       "                        <td id=\"T_5c989_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_5c989_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_5c989_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_5c989_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_5c989_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "                        <td id=\"T_5c989_row9_col6\" class=\"data row9 col6\" >44.75%</td>\n",
       "                        <td id=\"T_5c989_row9_col7\" class=\"data row9 col7\" >¥-0.27</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a751c0>"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 链式方法使用格式\n",
    "(df.head(15)\n",
    " .head(10)\n",
    " .assign(avg=df.mean(axis=1, numeric_only=True)/100) # 增加平均值百分比\n",
    " .assign(diff=lambda x: x.avg.diff()) # 和前位同学差值\n",
    " .style\n",
    " .format({'name': str.upper})\n",
    " .format({'avg': \"{:.2%}\"})\n",
    " .format({'diff': \"¥{:.2f}\"}, na_rep=\"-\")\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第三部分：样式配置\n",
    "\n",
    "Pandas 对样式可以做一些整体性的配置，保证后继无需逐一去进行设置。同时，还提供了一些操作方法，使样式内容的输出更新丰富。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 常用操作\n",
    "标题 caption\n",
    "给表格一个标题："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_e87e1_\" ><caption>学生成绩表</caption><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_e87e1_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_e87e1_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_e87e1_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_e87e1_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_e87e1_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_e87e1_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_e87e1_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e87e1_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_e87e1_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_e87e1_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_e87e1_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_e87e1_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_e87e1_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_e87e1_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e87e1_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_e87e1_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_e87e1_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_e87e1_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_e87e1_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_e87e1_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_e87e1_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e87e1_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_e87e1_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_e87e1_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_e87e1_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_e87e1_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_e87e1_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_e87e1_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e87e1_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_e87e1_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_e87e1_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_e87e1_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_e87e1_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_e87e1_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_e87e1_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a71c40>"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.set_caption('学生成绩表')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 精度 Precision\n",
    "可以设置全局的数据精度，即保留小数的位数。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_02ee3_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_02ee3_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_02ee3_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_02ee3_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_02ee3_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_02ee3_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_02ee3_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_02ee3_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_02ee3_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_02ee3_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_02ee3_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_02ee3_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_02ee3_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_02ee3_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_02ee3_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_02ee3_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_02ee3_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_02ee3_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_02ee3_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_02ee3_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_02ee3_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_02ee3_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_02ee3_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_02ee3_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_02ee3_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_02ee3_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_02ee3_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_02ee3_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_02ee3_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_02ee3_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_02ee3_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_02ee3_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_02ee3_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_02ee3_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_02ee3_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_02ee3_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_02ee3_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_02ee3_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_02ee3_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_02ee3_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_02ee3_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_02ee3_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_02ee3_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_02ee3_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_02ee3_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_02ee3_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_02ee3_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_02ee3_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_02ee3_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_02ee3_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_02ee3_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_02ee3_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_02ee3_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_02ee3_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_02ee3_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_02ee3_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_02ee3_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_02ee3_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_02ee3_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_02ee3_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_02ee3_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_02ee3_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_02ee3_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a67cd0>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 保留两个小数\n",
    "df[:10].style.set_precision(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_14685_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_14685_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_14685_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_14685_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_14685_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_14685_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_14685_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_14685_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_14685_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_14685_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_14685_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_14685_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_14685_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_14685_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_14685_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_14685_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_14685_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_14685_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_14685_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_14685_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_14685_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_14685_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_14685_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_14685_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_14685_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_14685_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_14685_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_14685_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_14685_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_14685_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_14685_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_14685_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_14685_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_14685_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_14685_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_14685_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_14685_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_14685_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_14685_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_14685_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_14685_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_14685_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_14685_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_14685_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_14685_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_14685_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_14685_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_14685_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_14685_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_14685_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_14685_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_14685_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_14685_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_14685_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_14685_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_14685_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_14685_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_14685_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_14685_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_14685_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_14685_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_14685_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_14685_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a9b130>"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 等同于\n",
    "df[:10].round(2).style"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 缺失值 Missing values\n",
    "缺失值的统一设置。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_3cb38_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_3cb38_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_3cb38_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_3cb38_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_3cb38_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_3cb38_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_3cb38_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_3cb38_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_3cb38_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_3cb38_row1_col1\" class=\"data row1 col1\" >暂无</td>\n",
       "                        <td id=\"T_3cb38_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_3cb38_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_3cb38_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_3cb38_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_3cb38_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_3cb38_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_3cb38_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_3cb38_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_3cb38_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_3cb38_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_3cb38_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_3cb38_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_3cb38_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_3cb38_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_3cb38_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_3cb38_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_3cb38_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_3cb38_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_3cb38_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_3cb38_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_3cb38_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_3cb38_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_3cb38_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_3cb38_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_3cb38_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_3cb38_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_3cb38_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_3cb38_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_3cb38_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_3cb38_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_3cb38_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_3cb38_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_3cb38_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_3cb38_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_3cb38_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_3cb38_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_3cb38_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_3cb38_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_3cb38_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_3cb38_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_3cb38_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_3cb38_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_3cb38_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_3cb38_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_3cb38_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_3cb38_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_3cb38_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_3cb38_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_3cb38_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_3cb38_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_3cb38_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_3cb38_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_3cb38_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a71d90>"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[:10].style.set_na_rep(\"暂无\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 隐藏索引和列"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_af121_\" ><thead>    <tr>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                                <td id=\"T_af121_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_af121_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_af121_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_af121_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_af121_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_af121_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_af121_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_af121_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_af121_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_af121_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_af121_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_af121_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_af121_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_af121_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_af121_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_af121_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_af121_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_af121_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_af121_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_af121_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_af121_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_af121_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_af121_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_af121_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                                <td id=\"T_af121_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_af121_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_af121_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_af121_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_af121_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_af121_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a5bdc0>"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 不输出索引\n",
    "df.head().style.hide_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_c0b26_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_c0b26_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                                        <td id=\"T_c0b26_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_c0b26_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_c0b26_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_c0b26_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                                        <td id=\"T_c0b26_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_c0b26_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_c0b26_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_c0b26_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                                        <td id=\"T_c0b26_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_c0b26_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_c0b26_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_c0b26_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                                        <td id=\"T_c0b26_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_c0b26_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_c0b26_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_c0b26_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                                        <td id=\"T_c0b26_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_c0b26_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_c0b26_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_c0b26_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                                        <td id=\"T_c0b26_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_c0b26_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_c0b26_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_c0b26_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                                        <td id=\"T_c0b26_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_c0b26_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_c0b26_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_c0b26_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                                        <td id=\"T_c0b26_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_c0b26_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_c0b26_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_c0b26_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                                        <td id=\"T_c0b26_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_c0b26_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_c0b26_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_c0b26_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_c0b26_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                                        <td id=\"T_c0b26_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_c0b26_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_c0b26_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_c0b26_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10ae0340>"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 不输出指定列\n",
    "df[:10].style.hide_columns(['name','team'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 表格样式 Table styles\n",
    "设置内联样式 set_properties\n",
    "给单元格设置 CSS 样式。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_ed467_row0_col2,#T_ed467_row1_col2,#T_ed467_row2_col2,#T_ed467_row3_col2,#T_ed467_row4_col2,#T_ed467_row5_col2,#T_ed467_row6_col2,#T_ed467_row7_col2,#T_ed467_row8_col2,#T_ed467_row9_col2{\n",
       "            color:  red;\n",
       "        }</style><table id=\"T_ed467_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_ed467_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_ed467_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_ed467_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_ed467_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_ed467_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_ed467_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_ed467_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_ed467_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_ed467_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_ed467_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_ed467_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_ed467_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_ed467_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_ed467_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_ed467_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_ed467_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_ed467_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_ed467_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_ed467_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_ed467_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_ed467_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_ed467_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_ed467_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_ed467_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_ed467_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_ed467_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_ed467_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_ed467_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_ed467_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_ed467_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_ed467_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_ed467_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_ed467_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_ed467_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_ed467_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_ed467_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_ed467_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_ed467_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_ed467_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_ed467_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_ed467_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_ed467_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_ed467_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_ed467_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_ed467_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_ed467_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_ed467_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_ed467_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_ed467_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_ed467_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_ed467_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_ed467_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_ed467_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_ed467_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_ed467_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_ed467_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_ed467_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_ed467_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_ed467_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_ed467_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_ed467_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_ed467_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10ae0c70>"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 指定列，设置字色为红色\n",
    "df[:10].style.set_properties(subset=['Q1'], **{'color': 'red'})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "一些其他示例"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_5cd87_row0_col0,#T_5cd87_row0_col1,#T_5cd87_row0_col2,#T_5cd87_row0_col3,#T_5cd87_row0_col4,#T_5cd87_row0_col5,#T_5cd87_row1_col0,#T_5cd87_row1_col1,#T_5cd87_row1_col2,#T_5cd87_row1_col3,#T_5cd87_row1_col4,#T_5cd87_row1_col5,#T_5cd87_row2_col0,#T_5cd87_row2_col1,#T_5cd87_row2_col2,#T_5cd87_row2_col3,#T_5cd87_row2_col4,#T_5cd87_row2_col5,#T_5cd87_row3_col0,#T_5cd87_row3_col1,#T_5cd87_row3_col2,#T_5cd87_row3_col3,#T_5cd87_row3_col4,#T_5cd87_row3_col5,#T_5cd87_row4_col0,#T_5cd87_row4_col1,#T_5cd87_row4_col2,#T_5cd87_row4_col3,#T_5cd87_row4_col4,#T_5cd87_row4_col5{\n",
       "            color:  white;\n",
       "            align:  right;\n",
       "        }</style><table id=\"T_5cd87_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_5cd87_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_5cd87_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_5cd87_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_5cd87_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_5cd87_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_5cd87_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_5cd87_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5cd87_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_5cd87_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_5cd87_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_5cd87_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_5cd87_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_5cd87_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_5cd87_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5cd87_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_5cd87_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_5cd87_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_5cd87_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_5cd87_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_5cd87_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_5cd87_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5cd87_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_5cd87_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_5cd87_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_5cd87_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_5cd87_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_5cd87_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_5cd87_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_5cd87_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_5cd87_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_5cd87_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_5cd87_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_5cd87_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_5cd87_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_5cd87_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a75520>"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.set_properties(color=\"white\", align=\"right\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_7e80f_row0_col0,#T_7e80f_row0_col1,#T_7e80f_row0_col2,#T_7e80f_row0_col3,#T_7e80f_row0_col4,#T_7e80f_row0_col5,#T_7e80f_row1_col0,#T_7e80f_row1_col1,#T_7e80f_row1_col2,#T_7e80f_row1_col3,#T_7e80f_row1_col4,#T_7e80f_row1_col5,#T_7e80f_row2_col0,#T_7e80f_row2_col1,#T_7e80f_row2_col2,#T_7e80f_row2_col3,#T_7e80f_row2_col4,#T_7e80f_row2_col5,#T_7e80f_row3_col0,#T_7e80f_row3_col1,#T_7e80f_row3_col2,#T_7e80f_row3_col3,#T_7e80f_row3_col4,#T_7e80f_row3_col5,#T_7e80f_row4_col0,#T_7e80f_row4_col1,#T_7e80f_row4_col2,#T_7e80f_row4_col3,#T_7e80f_row4_col4,#T_7e80f_row4_col5{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_7e80f_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_7e80f_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_7e80f_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_7e80f_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_7e80f_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_7e80f_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_7e80f_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_7e80f_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e80f_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_7e80f_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_7e80f_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_7e80f_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_7e80f_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_7e80f_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_7e80f_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e80f_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_7e80f_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_7e80f_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_7e80f_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_7e80f_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_7e80f_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_7e80f_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e80f_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_7e80f_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_7e80f_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_7e80f_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_7e80f_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_7e80f_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_7e80f_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e80f_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_7e80f_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_7e80f_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_7e80f_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_7e80f_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_7e80f_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_7e80f_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a109daa60>"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.set_properties(**{'background-color': 'yellow'})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_795ef_row0_col0,#T_795ef_row0_col1,#T_795ef_row0_col2,#T_795ef_row0_col3,#T_795ef_row0_col4,#T_795ef_row0_col5,#T_795ef_row1_col0,#T_795ef_row1_col1,#T_795ef_row1_col2,#T_795ef_row1_col3,#T_795ef_row1_col4,#T_795ef_row1_col5,#T_795ef_row2_col0,#T_795ef_row2_col1,#T_795ef_row2_col2,#T_795ef_row2_col3,#T_795ef_row2_col4,#T_795ef_row2_col5,#T_795ef_row3_col0,#T_795ef_row3_col1,#T_795ef_row3_col2,#T_795ef_row3_col3,#T_795ef_row3_col4,#T_795ef_row3_col5,#T_795ef_row4_col0,#T_795ef_row4_col1,#T_795ef_row4_col2,#T_795ef_row4_col3,#T_795ef_row4_col4,#T_795ef_row4_col5{\n",
       "            width:  100px;\n",
       "            font-size:  18px;\n",
       "        }</style><table id=\"T_795ef_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_795ef_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_795ef_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_795ef_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_795ef_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_795ef_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_795ef_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_795ef_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_795ef_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_795ef_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_795ef_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_795ef_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_795ef_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_795ef_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_795ef_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_795ef_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_795ef_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_795ef_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_795ef_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_795ef_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_795ef_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_795ef_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_795ef_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_795ef_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_795ef_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_795ef_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_795ef_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_795ef_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_795ef_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_795ef_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_795ef_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_795ef_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_795ef_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_795ef_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_795ef_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_795ef_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a67760>"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.set_properties(**{'width': '100px', 'font-size': '18px'})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_07e3c_row0_col0,#T_07e3c_row0_col1,#T_07e3c_row0_col2,#T_07e3c_row0_col3,#T_07e3c_row0_col4,#T_07e3c_row0_col5,#T_07e3c_row1_col0,#T_07e3c_row1_col1,#T_07e3c_row1_col2,#T_07e3c_row1_col3,#T_07e3c_row1_col4,#T_07e3c_row1_col5,#T_07e3c_row2_col0,#T_07e3c_row2_col1,#T_07e3c_row2_col2,#T_07e3c_row2_col3,#T_07e3c_row2_col4,#T_07e3c_row2_col5,#T_07e3c_row3_col0,#T_07e3c_row3_col1,#T_07e3c_row3_col2,#T_07e3c_row3_col3,#T_07e3c_row3_col4,#T_07e3c_row3_col5,#T_07e3c_row4_col0,#T_07e3c_row4_col1,#T_07e3c_row4_col2,#T_07e3c_row4_col3,#T_07e3c_row4_col4,#T_07e3c_row4_col5{\n",
       "            background-color:  black;\n",
       "            color:  lawngreen;\n",
       "            border-color:  white;\n",
       "        }</style><table id=\"T_07e3c_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_07e3c_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_07e3c_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_07e3c_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_07e3c_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_07e3c_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_07e3c_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_07e3c_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_07e3c_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_07e3c_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_07e3c_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_07e3c_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_07e3c_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_07e3c_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_07e3c_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_07e3c_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_07e3c_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_07e3c_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_07e3c_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_07e3c_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_07e3c_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_07e3c_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_07e3c_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_07e3c_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_07e3c_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_07e3c_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_07e3c_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_07e3c_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_07e3c_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_07e3c_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_07e3c_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_07e3c_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_07e3c_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_07e3c_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_07e3c_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_07e3c_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10ad3be0>"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.set_properties(**{'background-color': 'black',\n",
    "                           'color': 'lawngreen',\n",
    "                           'border-color': 'white'})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 表格属性 set_table_attributes\n",
    "给 `<table> `标签增加属性，可以随意给定属性名和属性值。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_a31d7_\" class=\"pure-table\"><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_a31d7_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_a31d7_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_a31d7_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_a31d7_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_a31d7_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_a31d7_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_a31d7_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a31d7_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_a31d7_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_a31d7_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_a31d7_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_a31d7_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_a31d7_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_a31d7_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a31d7_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_a31d7_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_a31d7_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_a31d7_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_a31d7_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_a31d7_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_a31d7_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a31d7_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_a31d7_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_a31d7_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_a31d7_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_a31d7_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_a31d7_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_a31d7_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a31d7_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_a31d7_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_a31d7_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_a31d7_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_a31d7_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_a31d7_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_a31d7_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a74130>"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.set_table_attributes('class=\"pure-table\"')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_0cc44_\" id=\"gairuo-table\"><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_0cc44_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_0cc44_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_0cc44_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_0cc44_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_0cc44_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_0cc44_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_0cc44_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0cc44_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_0cc44_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_0cc44_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_0cc44_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_0cc44_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_0cc44_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_0cc44_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0cc44_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_0cc44_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_0cc44_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_0cc44_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_0cc44_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_0cc44_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_0cc44_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0cc44_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_0cc44_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_0cc44_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_0cc44_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_0cc44_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_0cc44_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_0cc44_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_0cc44_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_0cc44_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_0cc44_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_0cc44_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_0cc44_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_0cc44_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_0cc44_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10ad3ca0>"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head().style.set_table_attributes('id=\"gairuo-table\"')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 表格样式属性指定 set_table_styles\n",
    "每个单独的table_样式都应该是一个带有选择器和props键的字典。选择器应该是样式将应用于的CSS选择器（自动以表的UUID作为前缀），props应该是具有（属性、值）的元组列表。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "    #T_dfd13_ tr:hover {\n",
       "          background-color: yellow;\n",
       "    }</style><table id=\"T_dfd13_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_dfd13_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_dfd13_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_dfd13_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_dfd13_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_dfd13_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_dfd13_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_dfd13_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dfd13_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_dfd13_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_dfd13_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_dfd13_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_dfd13_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_dfd13_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_dfd13_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dfd13_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_dfd13_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_dfd13_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_dfd13_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_dfd13_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_dfd13_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_dfd13_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dfd13_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_dfd13_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_dfd13_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_dfd13_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_dfd13_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_dfd13_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_dfd13_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dfd13_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_dfd13_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_dfd13_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_dfd13_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_dfd13_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_dfd13_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_dfd13_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a74e20>"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 给所有的行（tr 标签）的 hover 方法给一个黄色背景\n",
    "# 人话说是鼠标移动上去整行背景变黄\n",
    "df.head().style.set_table_styles(\n",
    "    [{'selector': 'tr:hover',\n",
    "      'props': [('background-color', 'yellow')]}]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "    #T_656b4_ .col2 {\n",
       "          color: red;\n",
       "    }    #T_656b4_ td.col3 {\n",
       "          color: blue;\n",
       "    }</style><table id=\"T_656b4_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_656b4_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_656b4_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_656b4_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_656b4_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_656b4_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_656b4_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_656b4_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_656b4_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_656b4_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_656b4_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_656b4_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_656b4_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_656b4_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_656b4_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_656b4_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_656b4_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_656b4_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_656b4_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_656b4_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_656b4_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_656b4_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_656b4_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_656b4_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_656b4_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_656b4_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_656b4_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_656b4_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_656b4_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_656b4_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_656b4_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_656b4_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_656b4_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_656b4_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_656b4_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_656b4_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_656b4_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_656b4_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_656b4_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_656b4_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_656b4_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_656b4_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_656b4_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_656b4_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_656b4_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_656b4_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_656b4_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_656b4_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_656b4_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_656b4_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_656b4_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_656b4_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_656b4_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_656b4_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_656b4_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_656b4_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_656b4_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_656b4_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_656b4_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_656b4_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_656b4_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_656b4_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_656b4_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a95f40>"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 按列设置不同的属性 overwrite 可设置替换还是扩展 pd 1.2.0+\n",
    "df[:10].style.set_table_styles({\n",
    "    'Q1': [{'selector': '',\n",
    "           'props': [('color', 'red')]}],\n",
    "    'Q2': [{'selector': 'td',\n",
    "           'props': [('color', 'blue')]}]\n",
    "}, overwrite=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "    #T_fe0ba_ td:hover.row0 {\n",
       "          font-size: 25px;\n",
       "    }</style><table id=\"T_fe0ba_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_fe0ba_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_fe0ba_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_fe0ba_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_fe0ba_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_fe0ba_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_fe0ba_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_fe0ba_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_fe0ba_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_fe0ba_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_fe0ba_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_fe0ba_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_fe0ba_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_fe0ba_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_fe0ba_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_fe0ba_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_fe0ba_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_fe0ba_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_fe0ba_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_fe0ba_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_fe0ba_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_fe0ba_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_fe0ba_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_fe0ba_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_fe0ba_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_fe0ba_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_fe0ba_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_fe0ba_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_fe0ba_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_fe0ba_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_fe0ba_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_fe0ba_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_fe0ba_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_fe0ba_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_fe0ba_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_fe0ba_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a957c0>"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# axis 可按列操作 pd 1.2.0+\n",
    "df.head().style.set_table_styles({\n",
    "    0: [{'selector': 'td:hover',\n",
    "         'props': [('font-size', '25px')]}]\n",
    "}, axis=1, overwrite=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 单元格符缀 set_uuid"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_9999\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_9999level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_9999row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_9999row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_9999row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_9999row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_9999row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_9999row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9999level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_9999row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_9999row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_9999row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_9999row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_9999row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_9999row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9999level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_9999row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_9999row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_9999row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_9999row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_9999row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_9999row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9999level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_9999row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_9999row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_9999row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_9999row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_9999row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_9999row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_9999level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_9999row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_9999row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_9999row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_9999row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_9999row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_9999row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a5b160>"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 给每个表格给一个相同的符缀\n",
    "df.head().style.set_uuid(9999)\n",
    "# ... <td id=\"T_9999row0_col2\"  .."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_gairuo\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_gairuolevel0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_gairuorow0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_gairuorow0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_gairuorow0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_gairuorow0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_gairuorow0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_gairuorow0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_gairuolevel0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_gairuorow1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_gairuorow1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_gairuorow1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_gairuorow1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_gairuorow1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_gairuorow1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_gairuolevel0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_gairuorow2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_gairuorow2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_gairuorow2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_gairuorow2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_gairuorow2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_gairuorow2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_gairuolevel0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_gairuorow3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_gairuorow3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_gairuorow3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_gairuorow3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_gairuorow3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_gairuorow3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_gairuolevel0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_gairuorow4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_gairuorow4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_gairuorow4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_gairuorow4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_gairuorow4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_gairuorow4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10a71a90>"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 加 gairuo\n",
    "df.head().style.set_uuid('gairuo')\n",
    "# ... <td id=\"T_gairuorow0_col2\" ..."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第四部分：样式应用函数\n",
    "像 Series 或者 DataFrame 的 apply() 和 applymap() 一样，Styler 也可以使用它们进行样式的复杂定义。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 应用函数\n",
    "样式调用函数的方法有：\n",
    "\n",
    "- Styler.applymap: 所有元素\n",
    "- Styler.apply: 列/行/表\n",
    "\n",
    "这两个方法都接受一个函数（以及一些其他关键字参数）并以某种方式将函数应用于数据帧。applymap 在 DataFrame 所有元素中有效。apply 根据 axis 关键字参数，一次将每个列或行传递到数据框中，或一次传递到整个表中。行使用 axis=0 （默认），列使用 axis=1，对于整个表，使用 axis=None。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 最大值字体置为红色"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_8a6b7_row0_col0,#T_8a6b7_row1_col3,#T_8a6b7_row2_col3,#T_8a6b7_row3_col1,#T_8a6b7_row4_col3,#T_8a6b7_row5_col2,#T_8a6b7_row6_col1,#T_8a6b7_row7_col2,#T_8a6b7_row8_col1,#T_8a6b7_row9_col0{\n",
       "            color:  red;\n",
       "        }</style><table id=\"T_8a6b7_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >Q1</th>        <th class=\"col_heading level0 col1\" >Q2</th>        <th class=\"col_heading level0 col2\" >Q3</th>        <th class=\"col_heading level0 col3\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_8a6b7_row0_col0\" class=\"data row0 col0\" >89</td>\n",
       "                        <td id=\"T_8a6b7_row0_col1\" class=\"data row0 col1\" >21</td>\n",
       "                        <td id=\"T_8a6b7_row0_col2\" class=\"data row0 col2\" >24</td>\n",
       "                        <td id=\"T_8a6b7_row0_col3\" class=\"data row0 col3\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_8a6b7_row1_col0\" class=\"data row1 col0\" >36</td>\n",
       "                        <td id=\"T_8a6b7_row1_col1\" class=\"data row1 col1\" >37</td>\n",
       "                        <td id=\"T_8a6b7_row1_col2\" class=\"data row1 col2\" >37</td>\n",
       "                        <td id=\"T_8a6b7_row1_col3\" class=\"data row1 col3\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_8a6b7_row2_col0\" class=\"data row2 col0\" >57</td>\n",
       "                        <td id=\"T_8a6b7_row2_col1\" class=\"data row2 col1\" >60</td>\n",
       "                        <td id=\"T_8a6b7_row2_col2\" class=\"data row2 col2\" >18</td>\n",
       "                        <td id=\"T_8a6b7_row2_col3\" class=\"data row2 col3\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_8a6b7_row3_col0\" class=\"data row3 col0\" >93</td>\n",
       "                        <td id=\"T_8a6b7_row3_col1\" class=\"data row3 col1\" >96</td>\n",
       "                        <td id=\"T_8a6b7_row3_col2\" class=\"data row3 col2\" >71</td>\n",
       "                        <td id=\"T_8a6b7_row3_col3\" class=\"data row3 col3\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_8a6b7_row4_col0\" class=\"data row4 col0\" >65</td>\n",
       "                        <td id=\"T_8a6b7_row4_col1\" class=\"data row4 col1\" >49</td>\n",
       "                        <td id=\"T_8a6b7_row4_col2\" class=\"data row4 col2\" >61</td>\n",
       "                        <td id=\"T_8a6b7_row4_col3\" class=\"data row4 col3\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_8a6b7_row5_col0\" class=\"data row5 col0\" >24</td>\n",
       "                        <td id=\"T_8a6b7_row5_col1\" class=\"data row5 col1\" >13</td>\n",
       "                        <td id=\"T_8a6b7_row5_col2\" class=\"data row5 col2\" >87</td>\n",
       "                        <td id=\"T_8a6b7_row5_col3\" class=\"data row5 col3\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_8a6b7_row6_col0\" class=\"data row6 col0\" >61</td>\n",
       "                        <td id=\"T_8a6b7_row6_col1\" class=\"data row6 col1\" >95</td>\n",
       "                        <td id=\"T_8a6b7_row6_col2\" class=\"data row6 col2\" >94</td>\n",
       "                        <td id=\"T_8a6b7_row6_col3\" class=\"data row6 col3\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_8a6b7_row7_col0\" class=\"data row7 col0\" >9</td>\n",
       "                        <td id=\"T_8a6b7_row7_col1\" class=\"data row7 col1\" >10</td>\n",
       "                        <td id=\"T_8a6b7_row7_col2\" class=\"data row7 col2\" >99</td>\n",
       "                        <td id=\"T_8a6b7_row7_col3\" class=\"data row7 col3\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_8a6b7_row8_col0\" class=\"data row8 col0\" >64</td>\n",
       "                        <td id=\"T_8a6b7_row8_col1\" class=\"data row8 col1\" >93</td>\n",
       "                        <td id=\"T_8a6b7_row8_col2\" class=\"data row8 col2\" >57</td>\n",
       "                        <td id=\"T_8a6b7_row8_col3\" class=\"data row8 col3\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8a6b7_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_8a6b7_row9_col0\" class=\"data row9 col0\" >77</td>\n",
       "                        <td id=\"T_8a6b7_row9_col1\" class=\"data row9 col1\" >9</td>\n",
       "                        <td id=\"T_8a6b7_row9_col2\" class=\"data row9 col2\" >26</td>\n",
       "                        <td id=\"T_8a6b7_row9_col3\" class=\"data row9 col3\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10ae0250>"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 最大值显示红色\n",
    "def highlight_max(x):\n",
    "    return ['color: red' if v == x.max() else '' for v in x]\n",
    "\n",
    "# 应用函数\n",
    "df.style.apply(highlight_max)\n",
    "# 按行应用\n",
    "df[:10].loc[:,'Q1':'Q4'].style.apply(highlight_max, axis=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 以下所有大于80分的格子背景为黄色"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_61e92_row0_col2,#T_61e92_row2_col5,#T_61e92_row3_col2,#T_61e92_row3_col3,#T_61e92_row4_col5,#T_61e92_row5_col4,#T_61e92_row6_col3,#T_61e92_row6_col4,#T_61e92_row7_col4,#T_61e92_row8_col3{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_61e92_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_61e92_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_61e92_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_61e92_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_61e92_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_61e92_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_61e92_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_61e92_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_61e92_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_61e92_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_61e92_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_61e92_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_61e92_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_61e92_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_61e92_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_61e92_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_61e92_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_61e92_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_61e92_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_61e92_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_61e92_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_61e92_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_61e92_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_61e92_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_61e92_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_61e92_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_61e92_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_61e92_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_61e92_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_61e92_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_61e92_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_61e92_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_61e92_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_61e92_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_61e92_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_61e92_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_61e92_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_61e92_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_61e92_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_61e92_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_61e92_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_61e92_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_61e92_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_61e92_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_61e92_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_61e92_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_61e92_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_61e92_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_61e92_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_61e92_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_61e92_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_61e92_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_61e92_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_61e92_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_61e92_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_61e92_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_61e92_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_61e92_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_61e92_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_61e92_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_61e92_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_61e92_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_61e92_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10b00a30>"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "yellow_css = 'background-color: yellow'\n",
    "sfun = lambda x: yellow_css if type(x) == int and x > 80 else ''\n",
    "(df[:10].style\n",
    " .applymap(sfun)\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### subset 参数可以指定部分内容应用样式规则"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_8193b_row0_col2,#T_8193b_row3_col2,#T_8193b_row3_col3,#T_8193b_row6_col3,#T_8193b_row8_col3{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_8193b_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_8193b_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_8193b_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_8193b_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_8193b_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_8193b_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_8193b_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_8193b_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_8193b_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_8193b_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_8193b_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_8193b_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_8193b_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_8193b_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_8193b_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_8193b_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_8193b_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_8193b_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_8193b_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_8193b_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_8193b_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_8193b_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_8193b_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_8193b_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_8193b_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_8193b_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_8193b_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_8193b_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_8193b_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_8193b_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_8193b_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_8193b_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_8193b_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_8193b_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_8193b_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_8193b_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_8193b_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_8193b_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_8193b_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_8193b_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_8193b_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_8193b_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_8193b_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_8193b_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_8193b_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_8193b_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_8193b_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_8193b_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_8193b_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_8193b_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_8193b_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_8193b_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_8193b_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_8193b_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_8193b_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_8193b_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_8193b_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_8193b_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_8193b_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_8193b_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_8193b_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_8193b_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_8193b_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10b03670>"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(df[:10].style\n",
    " .applymap(sfun, subset=['Q1', 'Q2'])\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 对满足条件的行整行加背景样式："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_24ce1_row0_col0,#T_24ce1_row0_col1,#T_24ce1_row0_col2,#T_24ce1_row0_col3,#T_24ce1_row0_col4,#T_24ce1_row0_col5,#T_24ce1_row3_col0,#T_24ce1_row3_col1,#T_24ce1_row3_col2,#T_24ce1_row3_col3,#T_24ce1_row3_col4,#T_24ce1_row3_col5{\n",
       "            background-color:  yellow;\n",
       "        }</style><table id=\"T_24ce1_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_24ce1_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_24ce1_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_24ce1_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_24ce1_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_24ce1_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_24ce1_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_24ce1_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_24ce1_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_24ce1_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_24ce1_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_24ce1_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_24ce1_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_24ce1_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_24ce1_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_24ce1_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_24ce1_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_24ce1_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_24ce1_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_24ce1_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_24ce1_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_24ce1_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_24ce1_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_24ce1_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_24ce1_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_24ce1_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_24ce1_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_24ce1_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_24ce1_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_24ce1_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_24ce1_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_24ce1_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_24ce1_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_24ce1_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_24ce1_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_24ce1_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_24ce1_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_24ce1_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_24ce1_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_24ce1_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_24ce1_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_24ce1_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_24ce1_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_24ce1_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_24ce1_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_24ce1_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_24ce1_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_24ce1_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_24ce1_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_24ce1_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_24ce1_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_24ce1_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_24ce1_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_24ce1_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_24ce1_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_24ce1_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_24ce1_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_24ce1_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_24ce1_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_24ce1_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_24ce1_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_24ce1_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_24ce1_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10b008b0>"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "yellow_css = 'background-color: yellow'\n",
    "sfun = lambda x: [yellow_css]*len(x) if x.Q1 > 80 else ['']*len(x)\n",
    "(df[:10].style\n",
    " .apply(sfun, axis=1)\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_dba5e_row0_col0,#T_dba5e_row0_col1,#T_dba5e_row0_col2,#T_dba5e_row0_col3,#T_dba5e_row0_col4,#T_dba5e_row0_col5,#T_dba5e_row3_col0,#T_dba5e_row3_col1,#T_dba5e_row3_col2,#T_dba5e_row3_col3,#T_dba5e_row3_col4,#T_dba5e_row3_col5{\n",
       "            color:  red;\n",
       "        }</style><table id=\"T_dba5e_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_dba5e_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_dba5e_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_dba5e_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_dba5e_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_dba5e_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_dba5e_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_dba5e_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_dba5e_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_dba5e_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_dba5e_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_dba5e_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_dba5e_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_dba5e_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_dba5e_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_dba5e_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_dba5e_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_dba5e_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_dba5e_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_dba5e_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_dba5e_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_dba5e_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_dba5e_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_dba5e_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_dba5e_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_dba5e_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_dba5e_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_dba5e_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_dba5e_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_dba5e_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_dba5e_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_dba5e_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_dba5e_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_dba5e_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_dba5e_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_dba5e_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_dba5e_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_dba5e_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_dba5e_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_dba5e_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_dba5e_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_dba5e_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_dba5e_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_dba5e_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_dba5e_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_dba5e_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_dba5e_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_dba5e_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_dba5e_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_dba5e_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_dba5e_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_dba5e_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_dba5e_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_dba5e_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_dba5e_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_dba5e_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_dba5e_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_dba5e_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_dba5e_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_dba5e_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_dba5e_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_dba5e_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_dba5e_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10afb1c0>"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用函数，字体颜色整行为红\n",
    "def row_color(s):\n",
    "    if s.Q1 > 80:\n",
    "        return ['color: red']*len(s)\n",
    "    else:\n",
    "        return ['']*len(s)\n",
    "\n",
    "# 调用\n",
    "df[:10].style.apply(row_color, axis=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 管道方法 Styler.pipe"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_7e1c4_row0_col0,#T_7e1c4_row0_col1,#T_7e1c4_row1_col0,#T_7e1c4_row1_col1,#T_7e1c4_row2_col0,#T_7e1c4_row2_col1,#T_7e1c4_row3_col0,#T_7e1c4_row4_col0,#T_7e1c4_row4_col1{\n",
       "            text-align:  right;\n",
       "        }#T_7e1c4_row3_col1{\n",
       "            background-color:  yellow;\n",
       "            text-align:  right;\n",
       "        }</style><table id=\"T_7e1c4_\" ><caption>Results with minimum conversion highlighted.</caption><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >trial</th>        <th class=\"col_heading level0 col1\" >conversion</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_7e1c4_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_7e1c4_row0_col0\" class=\"data row0 col0\" >0</td>\n",
       "                        <td id=\"T_7e1c4_row0_col1\" class=\"data row0 col1\" >75.0%</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e1c4_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_7e1c4_row1_col0\" class=\"data row1 col0\" >1</td>\n",
       "                        <td id=\"T_7e1c4_row1_col1\" class=\"data row1 col1\" >85.0%</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e1c4_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_7e1c4_row2_col0\" class=\"data row2 col0\" >2</td>\n",
       "                        <td id=\"T_7e1c4_row2_col1\" class=\"data row2 col1\" >nan%</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e1c4_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_7e1c4_row3_col0\" class=\"data row3 col0\" >3</td>\n",
       "                        <td id=\"T_7e1c4_row3_col1\" class=\"data row3 col1\" >70.0%</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_7e1c4_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_7e1c4_row4_col0\" class=\"data row4 col0\" >4</td>\n",
       "                        <td id=\"T_7e1c4_row4_col1\" class=\"data row4 col1\" >72.0%</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10b03940>"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 定义样式函数\n",
    "def format_conversion(styler):\n",
    "    return (styler.set_properties(**{'text-align': 'right'})\n",
    "                  .format({'conversion': '{:.1%}'}))\n",
    "\n",
    "df1 = pd.DataFrame({'trial': list(range(5)),\n",
    "                   'conversion': [0.75, 0.85, np.nan, 0.7, 0.72]})\n",
    "\n",
    "# 使用管道方法调用\n",
    "(df1[:10].style\n",
    "   .highlight_min(subset=['conversion'], color='yellow')\n",
    "   .pipe(format_conversion)\n",
    "   .set_caption(\"Results with minimum conversion highlighted.\")\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 样式复用\n",
    "可以将其他的样式利用到新的表格中："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>team</th>\n",
       "      <th>Q1</th>\n",
       "      <th>Q2</th>\n",
       "      <th>Q3</th>\n",
       "      <th>Q4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Liver</td>\n",
       "      <td>E</td>\n",
       "      <td>89</td>\n",
       "      <td>21</td>\n",
       "      <td>24</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Arry</td>\n",
       "      <td>NaN</td>\n",
       "      <td>36</td>\n",
       "      <td>37</td>\n",
       "      <td>37</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Ack</td>\n",
       "      <td>A</td>\n",
       "      <td>57</td>\n",
       "      <td>60</td>\n",
       "      <td>18</td>\n",
       "      <td>84</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Eorge</td>\n",
       "      <td>C</td>\n",
       "      <td>93</td>\n",
       "      <td>96</td>\n",
       "      <td>71</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Oah</td>\n",
       "      <td>D</td>\n",
       "      <td>65</td>\n",
       "      <td>49</td>\n",
       "      <td>61</td>\n",
       "      <td>86</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    name team  Q1  Q2  Q3  Q4\n",
       "0  Liver    E  89  21  24  64\n",
       "1   Arry  NaN  36  37  37  57\n",
       "2    Ack    A  57  60  18  84\n",
       "3  Eorge    C  93  96  71  78\n",
       "4    Oah    D  65  49  61  86"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = df.copy()\n",
    "df2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "#T_a5eb3_row0_col3,#T_a5eb3_row0_col4,#T_a5eb3_row1_col2,#T_a5eb3_row1_col3,#T_a5eb3_row1_col4,#T_a5eb3_row1_col5,#T_a5eb3_row2_col2,#T_a5eb3_row2_col4,#T_a5eb3_row4_col3,#T_a5eb3_row5_col2,#T_a5eb3_row5_col3,#T_a5eb3_row5_col5,#T_a5eb3_row6_col5,#T_a5eb3_row7_col2,#T_a5eb3_row7_col3,#T_a5eb3_row7_col5,#T_a5eb3_row8_col4,#T_a5eb3_row9_col3,#T_a5eb3_row9_col4{\n",
       "            background-color:  red;\n",
       "        }</style><table id=\"T_a5eb3_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_a5eb3_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_a5eb3_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_a5eb3_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_a5eb3_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_a5eb3_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_a5eb3_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_a5eb3_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_a5eb3_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_a5eb3_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_a5eb3_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_a5eb3_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_a5eb3_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_a5eb3_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_a5eb3_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_a5eb3_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_a5eb3_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_a5eb3_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_a5eb3_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_a5eb3_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_a5eb3_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_a5eb3_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_a5eb3_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_a5eb3_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_a5eb3_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_a5eb3_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_a5eb3_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_a5eb3_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_a5eb3_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_a5eb3_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_a5eb3_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_a5eb3_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_a5eb3_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_a5eb3_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_a5eb3_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_a5eb3_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_a5eb3_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_a5eb3_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_a5eb3_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_a5eb3_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_a5eb3_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_a5eb3_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_a5eb3_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_a5eb3_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_a5eb3_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_a5eb3_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_a5eb3_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_a5eb3_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_a5eb3_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_a5eb3_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_a5eb3_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_a5eb3_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_a5eb3_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_a5eb3_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_a5eb3_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_a5eb3_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_a5eb3_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_a5eb3_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_a5eb3_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_a5eb3_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_a5eb3_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_a5eb3_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10b00d60>"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "red_css = 'background-color: red'\n",
    "def color_negative_red(x):\n",
    "    return red_css if type(x) == int and x < 60 else ''\n",
    "\n",
    "sfun = lambda x: red_css if type(x) == int and x < 60 else ''\n",
    "# 将 df 的样式赋值给变量\n",
    "style1 = df.style.applymap(color_negative_red)\n",
    "# df2 的样式为 style2\n",
    "style2 = df2[:10].style\n",
    "# style2 使用 style1的样式\n",
    "style2.use(style1.export())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 样式清除"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.style.clear() # 会返回 None，清除所有样式。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_e7cc9_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >Q1</th>        <th class=\"col_heading level0 col1\" >Q2</th>        <th class=\"col_heading level0 col2\" >Q3</th>        <th class=\"col_heading level0 col3\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_e7cc9_row0_col0\" class=\"data row0 col0\" >89</td>\n",
       "                        <td id=\"T_e7cc9_row0_col1\" class=\"data row0 col1\" >21</td>\n",
       "                        <td id=\"T_e7cc9_row0_col2\" class=\"data row0 col2\" >24</td>\n",
       "                        <td id=\"T_e7cc9_row0_col3\" class=\"data row0 col3\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_e7cc9_row1_col0\" class=\"data row1 col0\" >36</td>\n",
       "                        <td id=\"T_e7cc9_row1_col1\" class=\"data row1 col1\" >37</td>\n",
       "                        <td id=\"T_e7cc9_row1_col2\" class=\"data row1 col2\" >37</td>\n",
       "                        <td id=\"T_e7cc9_row1_col3\" class=\"data row1 col3\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_e7cc9_row2_col0\" class=\"data row2 col0\" >57</td>\n",
       "                        <td id=\"T_e7cc9_row2_col1\" class=\"data row2 col1\" >60</td>\n",
       "                        <td id=\"T_e7cc9_row2_col2\" class=\"data row2 col2\" >18</td>\n",
       "                        <td id=\"T_e7cc9_row2_col3\" class=\"data row2 col3\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_e7cc9_row3_col0\" class=\"data row3 col0\" >93</td>\n",
       "                        <td id=\"T_e7cc9_row3_col1\" class=\"data row3 col1\" >96</td>\n",
       "                        <td id=\"T_e7cc9_row3_col2\" class=\"data row3 col2\" >71</td>\n",
       "                        <td id=\"T_e7cc9_row3_col3\" class=\"data row3 col3\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_e7cc9_row4_col0\" class=\"data row4 col0\" >65</td>\n",
       "                        <td id=\"T_e7cc9_row4_col1\" class=\"data row4 col1\" >49</td>\n",
       "                        <td id=\"T_e7cc9_row4_col2\" class=\"data row4 col2\" >61</td>\n",
       "                        <td id=\"T_e7cc9_row4_col3\" class=\"data row4 col3\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_e7cc9_row5_col0\" class=\"data row5 col0\" >24</td>\n",
       "                        <td id=\"T_e7cc9_row5_col1\" class=\"data row5 col1\" >13</td>\n",
       "                        <td id=\"T_e7cc9_row5_col2\" class=\"data row5 col2\" >87</td>\n",
       "                        <td id=\"T_e7cc9_row5_col3\" class=\"data row5 col3\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_e7cc9_row6_col0\" class=\"data row6 col0\" >61</td>\n",
       "                        <td id=\"T_e7cc9_row6_col1\" class=\"data row6 col1\" >95</td>\n",
       "                        <td id=\"T_e7cc9_row6_col2\" class=\"data row6 col2\" >94</td>\n",
       "                        <td id=\"T_e7cc9_row6_col3\" class=\"data row6 col3\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_e7cc9_row7_col0\" class=\"data row7 col0\" >9</td>\n",
       "                        <td id=\"T_e7cc9_row7_col1\" class=\"data row7 col1\" >10</td>\n",
       "                        <td id=\"T_e7cc9_row7_col2\" class=\"data row7 col2\" >99</td>\n",
       "                        <td id=\"T_e7cc9_row7_col3\" class=\"data row7 col3\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_e7cc9_row8_col0\" class=\"data row8 col0\" >64</td>\n",
       "                        <td id=\"T_e7cc9_row8_col1\" class=\"data row8 col1\" >93</td>\n",
       "                        <td id=\"T_e7cc9_row8_col2\" class=\"data row8 col2\" >57</td>\n",
       "                        <td id=\"T_e7cc9_row8_col3\" class=\"data row8 col3\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_e7cc9_row9_col0\" class=\"data row9 col0\" >77</td>\n",
       "                        <td id=\"T_e7cc9_row9_col1\" class=\"data row9 col1\" >9</td>\n",
       "                        <td id=\"T_e7cc9_row9_col2\" class=\"data row9 col2\" >26</td>\n",
       "                        <td id=\"T_e7cc9_row9_col3\" class=\"data row9 col3\" >67</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_e7cc9_level0_row10\" class=\"row_heading level0 row10\" >10</th>\n",
       "                        <td id=\"T_e7cc9_row10_col0\" class=\"data row10 col0\" >17</td>\n",
       "                        <td id=\"T_e7cc9_row10_col1\" class=\"data row10 col1\" >4</td>\n",
       "                        <td id=\"T_e7cc9_row10_col2\" class=\"data row10 col2\" >33</td>\n",
       "                        <td id=\"T_e7cc9_row10_col3\" class=\"data row10 col3\" >79</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<pandas.io.formats.style.Styler at 0x14a10afb3a0>"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 定义为一个变量\n",
    "dfs = df.loc[:10,'Q1':'Q4'].style.apply(highlight_max)\n",
    "dfs.clear() # 清除\n",
    "dfs # 此时 dfs 不带任何样式，但还是 Styler 对象"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第五部分：带样式文件的导入\n",
    "可以将样式生成 Html 和 导出 Excel。生成 Html 可以用它来发邮件，做网页界面，生成 Excel 可以做二次处理或者传播。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 导出 Excel\n",
    "样式导出 Excel 后会保留原来定义的样式。\n",
    "```python\n",
    "# 导出 Excel\n",
    "df.style.to_excel('new_team.xlsx')\n",
    "# 使用指定引擎，openpyxl 的样式兼容更好些\n",
    "df.style.to_excel('new_team.xlsx', engine='openpyxl')\n",
    "# 指定标签页名称，sheet name\n",
    "dfs.to_excel('new_team.xlsx', sheet_name='Sheet1')\n",
    "# 缺失值的指定\n",
    "dfs.to_excel('new_team.xlsx', na_rep='-')\n",
    "# 浮点数字格式, 下例将 0.1234 转为 0.12\n",
    "dfs.to_excel('new_team.xlsx', float_format=\"%.2f\")\n",
    "# 只要这两例\n",
    "dfs.to_excel('new_team.xlsx', columns=['Q1', 'Q2'])\n",
    "# 不带表头\n",
    "dfs.to_excel('new_team.xlsx', header=False)\n",
    "# 不带索引\n",
    "dfs.to_excel('new_team.xlsx', index=False)\n",
    "# 指定索引，多个为多层索引\n",
    "dfs.to_excel('new_team.xlsx', index_label=['team', 'name'])\n",
    "# 从哪行取，从哪列取\n",
    "dfs.to_excel('new_team.xlsx', startrow=10, startcol=3)\n",
    "# 不合并单元格\n",
    "dfs.to_excel('new_team.xlsx', merge_cells=False)\n",
    "# 指定编码\n",
    "dfs.to_excel('new_team.xlsx', encoding='utf-8')\n",
    "# 无穷大表示法（Excel中没有无穷大的本机表示法）\n",
    "dfs.to_excel('new_team.xlsx', inf_rep='inf')\n",
    "# 在错误日志中显示更多信息\n",
    "dfs.to_excel('new_team.xlsx', verbose=True)\n",
    "# 指定要冻结的最底行和最右列\n",
    "dfs.to_excel('new_team.xlsx', freeze_panes=(0,2))\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 输出 Html\n",
    "Styler.render() 可以输出样式的 Html 代码，它可以传入以下参数：\n",
    "\n",
    "- head\n",
    "- cellstyle\n",
    "- body\n",
    "- uuid\n",
    "- precision\n",
    "- table_styles\n",
    "- caption\n",
    "- table_attributes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'<style  type=\"text/css\" >\\n</style><table id=\"T_6c2ae_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\\n                <tr>\\n                        <th id=\"T_6c2ae_level0_row0\" class=\"row_heading level0 row0\" >0</th>\\n                        <td id=\"T_6c2ae_row0_col0\" class=\"data row0 col0\" >Liver</td>\\n                        <td id=\"T_6c2ae_row0_col1\" class=\"data row0 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row0_col2\" class=\"data row0 col2\" >89</td>\\n                        <td id=\"T_6c2ae_row0_col3\" class=\"data row0 col3\" >21</td>\\n                        <td id=\"T_6c2ae_row0_col4\" class=\"data row0 col4\" >24</td>\\n                        <td id=\"T_6c2ae_row0_col5\" class=\"data row0 col5\" >64</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row1\" class=\"row_heading level0 row1\" >1</th>\\n                        <td id=\"T_6c2ae_row1_col0\" class=\"data row1 col0\" >Arry</td>\\n                        <td id=\"T_6c2ae_row1_col1\" class=\"data row1 col1\" >nan</td>\\n                        <td id=\"T_6c2ae_row1_col2\" class=\"data row1 col2\" >36</td>\\n                        <td id=\"T_6c2ae_row1_col3\" class=\"data row1 col3\" >37</td>\\n                        <td id=\"T_6c2ae_row1_col4\" class=\"data row1 col4\" >37</td>\\n                        <td id=\"T_6c2ae_row1_col5\" class=\"data row1 col5\" >57</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row2\" class=\"row_heading level0 row2\" >2</th>\\n                        <td id=\"T_6c2ae_row2_col0\" class=\"data row2 col0\" >Ack</td>\\n                        <td id=\"T_6c2ae_row2_col1\" class=\"data row2 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row2_col2\" class=\"data row2 col2\" >57</td>\\n                        <td id=\"T_6c2ae_row2_col3\" class=\"data row2 col3\" >60</td>\\n                        <td id=\"T_6c2ae_row2_col4\" class=\"data row2 col4\" >18</td>\\n                        <td id=\"T_6c2ae_row2_col5\" class=\"data row2 col5\" >84</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row3\" class=\"row_heading level0 row3\" >3</th>\\n                        <td id=\"T_6c2ae_row3_col0\" class=\"data row3 col0\" >Eorge</td>\\n                        <td id=\"T_6c2ae_row3_col1\" class=\"data row3 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row3_col2\" class=\"data row3 col2\" >93</td>\\n                        <td id=\"T_6c2ae_row3_col3\" class=\"data row3 col3\" >96</td>\\n                        <td id=\"T_6c2ae_row3_col4\" class=\"data row3 col4\" >71</td>\\n                        <td id=\"T_6c2ae_row3_col5\" class=\"data row3 col5\" >78</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row4\" class=\"row_heading level0 row4\" >4</th>\\n                        <td id=\"T_6c2ae_row4_col0\" class=\"data row4 col0\" >Oah</td>\\n                        <td id=\"T_6c2ae_row4_col1\" class=\"data row4 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row4_col2\" class=\"data row4 col2\" >65</td>\\n                        <td id=\"T_6c2ae_row4_col3\" class=\"data row4 col3\" >49</td>\\n                        <td id=\"T_6c2ae_row4_col4\" class=\"data row4 col4\" >61</td>\\n                        <td id=\"T_6c2ae_row4_col5\" class=\"data row4 col5\" >86</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row5\" class=\"row_heading level0 row5\" >5</th>\\n                        <td id=\"T_6c2ae_row5_col0\" class=\"data row5 col0\" >Harlie</td>\\n                        <td id=\"T_6c2ae_row5_col1\" class=\"data row5 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row5_col2\" class=\"data row5 col2\" >24</td>\\n                        <td id=\"T_6c2ae_row5_col3\" class=\"data row5 col3\" >13</td>\\n                        <td id=\"T_6c2ae_row5_col4\" class=\"data row5 col4\" >87</td>\\n                        <td id=\"T_6c2ae_row5_col5\" class=\"data row5 col5\" >43</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row6\" class=\"row_heading level0 row6\" >6</th>\\n                        <td id=\"T_6c2ae_row6_col0\" class=\"data row6 col0\" >Acob</td>\\n                        <td id=\"T_6c2ae_row6_col1\" class=\"data row6 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row6_col2\" class=\"data row6 col2\" >61</td>\\n                        <td id=\"T_6c2ae_row6_col3\" class=\"data row6 col3\" >95</td>\\n                        <td id=\"T_6c2ae_row6_col4\" class=\"data row6 col4\" >94</td>\\n                        <td id=\"T_6c2ae_row6_col5\" class=\"data row6 col5\" >8</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row7\" class=\"row_heading level0 row7\" >7</th>\\n                        <td id=\"T_6c2ae_row7_col0\" class=\"data row7 col0\" >Lfie</td>\\n                        <td id=\"T_6c2ae_row7_col1\" class=\"data row7 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row7_col2\" class=\"data row7 col2\" >9</td>\\n                        <td id=\"T_6c2ae_row7_col3\" class=\"data row7 col3\" >10</td>\\n                        <td id=\"T_6c2ae_row7_col4\" class=\"data row7 col4\" >99</td>\\n                        <td id=\"T_6c2ae_row7_col5\" class=\"data row7 col5\" >37</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row8\" class=\"row_heading level0 row8\" >8</th>\\n                        <td id=\"T_6c2ae_row8_col0\" class=\"data row8 col0\" >Reddie</td>\\n                        <td id=\"T_6c2ae_row8_col1\" class=\"data row8 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row8_col2\" class=\"data row8 col2\" >64</td>\\n                        <td id=\"T_6c2ae_row8_col3\" class=\"data row8 col3\" >93</td>\\n                        <td id=\"T_6c2ae_row8_col4\" class=\"data row8 col4\" >57</td>\\n                        <td id=\"T_6c2ae_row8_col5\" class=\"data row8 col5\" >72</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row9\" class=\"row_heading level0 row9\" >9</th>\\n                        <td id=\"T_6c2ae_row9_col0\" class=\"data row9 col0\" >Oscar</td>\\n                        <td id=\"T_6c2ae_row9_col1\" class=\"data row9 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row9_col2\" class=\"data row9 col2\" >77</td>\\n                        <td id=\"T_6c2ae_row9_col3\" class=\"data row9 col3\" >9</td>\\n                        <td id=\"T_6c2ae_row9_col4\" class=\"data row9 col4\" >26</td>\\n                        <td id=\"T_6c2ae_row9_col5\" class=\"data row9 col5\" >67</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row10\" class=\"row_heading level0 row10\" >10</th>\\n                        <td id=\"T_6c2ae_row10_col0\" class=\"data row10 col0\" >Leo</td>\\n                        <td id=\"T_6c2ae_row10_col1\" class=\"data row10 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row10_col2\" class=\"data row10 col2\" >17</td>\\n                        <td id=\"T_6c2ae_row10_col3\" class=\"data row10 col3\" >4</td>\\n                        <td id=\"T_6c2ae_row10_col4\" class=\"data row10 col4\" >33</td>\\n                        <td id=\"T_6c2ae_row10_col5\" class=\"data row10 col5\" >79</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row11\" class=\"row_heading level0 row11\" >11</th>\\n                        <td id=\"T_6c2ae_row11_col0\" class=\"data row11 col0\" >Logan</td>\\n                        <td id=\"T_6c2ae_row11_col1\" class=\"data row11 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row11_col2\" class=\"data row11 col2\" >9</td>\\n                        <td id=\"T_6c2ae_row11_col3\" class=\"data row11 col3\" >89</td>\\n                        <td id=\"T_6c2ae_row11_col4\" class=\"data row11 col4\" >35</td>\\n                        <td id=\"T_6c2ae_row11_col5\" class=\"data row11 col5\" >65</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row12\" class=\"row_heading level0 row12\" >12</th>\\n                        <td id=\"T_6c2ae_row12_col0\" class=\"data row12 col0\" >Archie</td>\\n                        <td id=\"T_6c2ae_row12_col1\" class=\"data row12 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row12_col2\" class=\"data row12 col2\" >83</td>\\n                        <td id=\"T_6c2ae_row12_col3\" class=\"data row12 col3\" >89</td>\\n                        <td id=\"T_6c2ae_row12_col4\" class=\"data row12 col4\" >59</td>\\n                        <td id=\"T_6c2ae_row12_col5\" class=\"data row12 col5\" >68</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row13\" class=\"row_heading level0 row13\" >13</th>\\n                        <td id=\"T_6c2ae_row13_col0\" class=\"data row13 col0\" >Theo</td>\\n                        <td id=\"T_6c2ae_row13_col1\" class=\"data row13 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row13_col2\" class=\"data row13 col2\" >51</td>\\n                        <td id=\"T_6c2ae_row13_col3\" class=\"data row13 col3\" >86</td>\\n                        <td id=\"T_6c2ae_row13_col4\" class=\"data row13 col4\" >87</td>\\n                        <td id=\"T_6c2ae_row13_col5\" class=\"data row13 col5\" >27</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row14\" class=\"row_heading level0 row14\" >14</th>\\n                        <td id=\"T_6c2ae_row14_col0\" class=\"data row14 col0\" >Thomas</td>\\n                        <td id=\"T_6c2ae_row14_col1\" class=\"data row14 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row14_col2\" class=\"data row14 col2\" >80</td>\\n                        <td id=\"T_6c2ae_row14_col3\" class=\"data row14 col3\" >48</td>\\n                        <td id=\"T_6c2ae_row14_col4\" class=\"data row14 col4\" >56</td>\\n                        <td id=\"T_6c2ae_row14_col5\" class=\"data row14 col5\" >41</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row15\" class=\"row_heading level0 row15\" >15</th>\\n                        <td id=\"T_6c2ae_row15_col0\" class=\"data row15 col0\" >James</td>\\n                        <td id=\"T_6c2ae_row15_col1\" class=\"data row15 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row15_col2\" class=\"data row15 col2\" >48</td>\\n                        <td id=\"T_6c2ae_row15_col3\" class=\"data row15 col3\" >77</td>\\n                        <td id=\"T_6c2ae_row15_col4\" class=\"data row15 col4\" >52</td>\\n                        <td id=\"T_6c2ae_row15_col5\" class=\"data row15 col5\" >11</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row16\" class=\"row_heading level0 row16\" >16</th>\\n                        <td id=\"T_6c2ae_row16_col0\" class=\"data row16 col0\" >Joshua</td>\\n                        <td id=\"T_6c2ae_row16_col1\" class=\"data row16 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row16_col2\" class=\"data row16 col2\" >63</td>\\n                        <td id=\"T_6c2ae_row16_col3\" class=\"data row16 col3\" >4</td>\\n                        <td id=\"T_6c2ae_row16_col4\" class=\"data row16 col4\" >80</td>\\n                        <td id=\"T_6c2ae_row16_col5\" class=\"data row16 col5\" >30</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row17\" class=\"row_heading level0 row17\" >17</th>\\n                        <td id=\"T_6c2ae_row17_col0\" class=\"data row17 col0\" >Henry</td>\\n                        <td id=\"T_6c2ae_row17_col1\" class=\"data row17 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row17_col2\" class=\"data row17 col2\" >91</td>\\n                        <td id=\"T_6c2ae_row17_col3\" class=\"data row17 col3\" >15</td>\\n                        <td id=\"T_6c2ae_row17_col4\" class=\"data row17 col4\" >75</td>\\n                        <td id=\"T_6c2ae_row17_col5\" class=\"data row17 col5\" >17</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row18\" class=\"row_heading level0 row18\" >18</th>\\n                        <td id=\"T_6c2ae_row18_col0\" class=\"data row18 col0\" >William</td>\\n                        <td id=\"T_6c2ae_row18_col1\" class=\"data row18 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row18_col2\" class=\"data row18 col2\" >80</td>\\n                        <td id=\"T_6c2ae_row18_col3\" class=\"data row18 col3\" >68</td>\\n                        <td id=\"T_6c2ae_row18_col4\" class=\"data row18 col4\" >3</td>\\n                        <td id=\"T_6c2ae_row18_col5\" class=\"data row18 col5\" >26</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row19\" class=\"row_heading level0 row19\" >19</th>\\n                        <td id=\"T_6c2ae_row19_col0\" class=\"data row19 col0\" >Max</td>\\n                        <td id=\"T_6c2ae_row19_col1\" class=\"data row19 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row19_col2\" class=\"data row19 col2\" >97</td>\\n                        <td id=\"T_6c2ae_row19_col3\" class=\"data row19 col3\" >75</td>\\n                        <td id=\"T_6c2ae_row19_col4\" class=\"data row19 col4\" >41</td>\\n                        <td id=\"T_6c2ae_row19_col5\" class=\"data row19 col5\" >3</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row20\" class=\"row_heading level0 row20\" >20</th>\\n                        <td id=\"T_6c2ae_row20_col0\" class=\"data row20 col0\" >Lucas</td>\\n                        <td id=\"T_6c2ae_row20_col1\" class=\"data row20 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row20_col2\" class=\"data row20 col2\" >60</td>\\n                        <td id=\"T_6c2ae_row20_col3\" class=\"data row20 col3\" >41</td>\\n                        <td id=\"T_6c2ae_row20_col4\" class=\"data row20 col4\" >77</td>\\n                        <td id=\"T_6c2ae_row20_col5\" class=\"data row20 col5\" >62</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row21\" class=\"row_heading level0 row21\" >21</th>\\n                        <td id=\"T_6c2ae_row21_col0\" class=\"data row21 col0\" >Ethan</td>\\n                        <td id=\"T_6c2ae_row21_col1\" class=\"data row21 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row21_col2\" class=\"data row21 col2\" >79</td>\\n                        <td id=\"T_6c2ae_row21_col3\" class=\"data row21 col3\" >45</td>\\n                        <td id=\"T_6c2ae_row21_col4\" class=\"data row21 col4\" >89</td>\\n                        <td id=\"T_6c2ae_row21_col5\" class=\"data row21 col5\" >88</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row22\" class=\"row_heading level0 row22\" >22</th>\\n                        <td id=\"T_6c2ae_row22_col0\" class=\"data row22 col0\" >Arthur</td>\\n                        <td id=\"T_6c2ae_row22_col1\" class=\"data row22 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row22_col2\" class=\"data row22 col2\" >44</td>\\n                        <td id=\"T_6c2ae_row22_col3\" class=\"data row22 col3\" >53</td>\\n                        <td id=\"T_6c2ae_row22_col4\" class=\"data row22 col4\" >42</td>\\n                        <td id=\"T_6c2ae_row22_col5\" class=\"data row22 col5\" >40</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row23\" class=\"row_heading level0 row23\" >23</th>\\n                        <td id=\"T_6c2ae_row23_col0\" class=\"data row23 col0\" >Mason</td>\\n                        <td id=\"T_6c2ae_row23_col1\" class=\"data row23 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row23_col2\" class=\"data row23 col2\" >80</td>\\n                        <td id=\"T_6c2ae_row23_col3\" class=\"data row23 col3\" >96</td>\\n                        <td id=\"T_6c2ae_row23_col4\" class=\"data row23 col4\" >26</td>\\n                        <td id=\"T_6c2ae_row23_col5\" class=\"data row23 col5\" >49</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row24\" class=\"row_heading level0 row24\" >24</th>\\n                        <td id=\"T_6c2ae_row24_col0\" class=\"data row24 col0\" >Isaac</td>\\n                        <td id=\"T_6c2ae_row24_col1\" class=\"data row24 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row24_col2\" class=\"data row24 col2\" >74</td>\\n                        <td id=\"T_6c2ae_row24_col3\" class=\"data row24 col3\" >23</td>\\n                        <td id=\"T_6c2ae_row24_col4\" class=\"data row24 col4\" >28</td>\\n                        <td id=\"T_6c2ae_row24_col5\" class=\"data row24 col5\" >65</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row25\" class=\"row_heading level0 row25\" >25</th>\\n                        <td id=\"T_6c2ae_row25_col0\" class=\"data row25 col0\" >Harrison</td>\\n                        <td id=\"T_6c2ae_row25_col1\" class=\"data row25 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row25_col2\" class=\"data row25 col2\" >89</td>\\n                        <td id=\"T_6c2ae_row25_col3\" class=\"data row25 col3\" >13</td>\\n                        <td id=\"T_6c2ae_row25_col4\" class=\"data row25 col4\" >18</td>\\n                        <td id=\"T_6c2ae_row25_col5\" class=\"data row25 col5\" >75</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row26\" class=\"row_heading level0 row26\" >26</th>\\n                        <td id=\"T_6c2ae_row26_col0\" class=\"data row26 col0\" >Teddy</td>\\n                        <td id=\"T_6c2ae_row26_col1\" class=\"data row26 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row26_col2\" class=\"data row26 col2\" >71</td>\\n                        <td id=\"T_6c2ae_row26_col3\" class=\"data row26 col3\" >91</td>\\n                        <td id=\"T_6c2ae_row26_col4\" class=\"data row26 col4\" >21</td>\\n                        <td id=\"T_6c2ae_row26_col5\" class=\"data row26 col5\" >48</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row27\" class=\"row_heading level0 row27\" >27</th>\\n                        <td id=\"T_6c2ae_row27_col0\" class=\"data row27 col0\" >Finley</td>\\n                        <td id=\"T_6c2ae_row27_col1\" class=\"data row27 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row27_col2\" class=\"data row27 col2\" >62</td>\\n                        <td id=\"T_6c2ae_row27_col3\" class=\"data row27 col3\" >73</td>\\n                        <td id=\"T_6c2ae_row27_col4\" class=\"data row27 col4\" >84</td>\\n                        <td id=\"T_6c2ae_row27_col5\" class=\"data row27 col5\" >68</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row28\" class=\"row_heading level0 row28\" >28</th>\\n                        <td id=\"T_6c2ae_row28_col0\" class=\"data row28 col0\" >Daniel</td>\\n                        <td id=\"T_6c2ae_row28_col1\" class=\"data row28 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row28_col2\" class=\"data row28 col2\" >50</td>\\n                        <td id=\"T_6c2ae_row28_col3\" class=\"data row28 col3\" >50</td>\\n                        <td id=\"T_6c2ae_row28_col4\" class=\"data row28 col4\" >72</td>\\n                        <td id=\"T_6c2ae_row28_col5\" class=\"data row28 col5\" >61</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row29\" class=\"row_heading level0 row29\" >29</th>\\n                        <td id=\"T_6c2ae_row29_col0\" class=\"data row29 col0\" >Riley</td>\\n                        <td id=\"T_6c2ae_row29_col1\" class=\"data row29 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row29_col2\" class=\"data row29 col2\" >35</td>\\n                        <td id=\"T_6c2ae_row29_col3\" class=\"data row29 col3\" >26</td>\\n                        <td id=\"T_6c2ae_row29_col4\" class=\"data row29 col4\" >59</td>\\n                        <td id=\"T_6c2ae_row29_col5\" class=\"data row29 col5\" >83</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row30\" class=\"row_heading level0 row30\" >30</th>\\n                        <td id=\"T_6c2ae_row30_col0\" class=\"data row30 col0\" >Edward</td>\\n                        <td id=\"T_6c2ae_row30_col1\" class=\"data row30 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row30_col2\" class=\"data row30 col2\" >57</td>\\n                        <td id=\"T_6c2ae_row30_col3\" class=\"data row30 col3\" >38</td>\\n                        <td id=\"T_6c2ae_row30_col4\" class=\"data row30 col4\" >86</td>\\n                        <td id=\"T_6c2ae_row30_col5\" class=\"data row30 col5\" >87</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row31\" class=\"row_heading level0 row31\" >31</th>\\n                        <td id=\"T_6c2ae_row31_col0\" class=\"data row31 col0\" >Joseph</td>\\n                        <td id=\"T_6c2ae_row31_col1\" class=\"data row31 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row31_col2\" class=\"data row31 col2\" >67</td>\\n                        <td id=\"T_6c2ae_row31_col3\" class=\"data row31 col3\" >87</td>\\n                        <td id=\"T_6c2ae_row31_col4\" class=\"data row31 col4\" >87</td>\\n                        <td id=\"T_6c2ae_row31_col5\" class=\"data row31 col5\" >93</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row32\" class=\"row_heading level0 row32\" >32</th>\\n                        <td id=\"T_6c2ae_row32_col0\" class=\"data row32 col0\" >Alexander</td>\\n                        <td id=\"T_6c2ae_row32_col1\" class=\"data row32 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row32_col2\" class=\"data row32 col2\" >91</td>\\n                        <td id=\"T_6c2ae_row32_col3\" class=\"data row32 col3\" >76</td>\\n                        <td id=\"T_6c2ae_row32_col4\" class=\"data row32 col4\" >26</td>\\n                        <td id=\"T_6c2ae_row32_col5\" class=\"data row32 col5\" >79</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row33\" class=\"row_heading level0 row33\" >33</th>\\n                        <td id=\"T_6c2ae_row33_col0\" class=\"data row33 col0\" >Adam</td>\\n                        <td id=\"T_6c2ae_row33_col1\" class=\"data row33 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row33_col2\" class=\"data row33 col2\" >90</td>\\n                        <td id=\"T_6c2ae_row33_col3\" class=\"data row33 col3\" >32</td>\\n                        <td id=\"T_6c2ae_row33_col4\" class=\"data row33 col4\" >47</td>\\n                        <td id=\"T_6c2ae_row33_col5\" class=\"data row33 col5\" >39</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row34\" class=\"row_heading level0 row34\" >34</th>\\n                        <td id=\"T_6c2ae_row34_col0\" class=\"data row34 col0\" >Reggie1</td>\\n                        <td id=\"T_6c2ae_row34_col1\" class=\"data row34 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row34_col2\" class=\"data row34 col2\" >30</td>\\n                        <td id=\"T_6c2ae_row34_col3\" class=\"data row34 col3\" >12</td>\\n                        <td id=\"T_6c2ae_row34_col4\" class=\"data row34 col4\" >23</td>\\n                        <td id=\"T_6c2ae_row34_col5\" class=\"data row34 col5\" >9</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row35\" class=\"row_heading level0 row35\" >35</th>\\n                        <td id=\"T_6c2ae_row35_col0\" class=\"data row35 col0\" >Samuel</td>\\n                        <td id=\"T_6c2ae_row35_col1\" class=\"data row35 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row35_col2\" class=\"data row35 col2\" >9</td>\\n                        <td id=\"T_6c2ae_row35_col3\" class=\"data row35 col3\" >38</td>\\n                        <td id=\"T_6c2ae_row35_col4\" class=\"data row35 col4\" >88</td>\\n                        <td id=\"T_6c2ae_row35_col5\" class=\"data row35 col5\" >66</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row36\" class=\"row_heading level0 row36\" >36</th>\\n                        <td id=\"T_6c2ae_row36_col0\" class=\"data row36 col0\" >Jaxon</td>\\n                        <td id=\"T_6c2ae_row36_col1\" class=\"data row36 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row36_col2\" class=\"data row36 col2\" >88</td>\\n                        <td id=\"T_6c2ae_row36_col3\" class=\"data row36 col3\" >98</td>\\n                        <td id=\"T_6c2ae_row36_col4\" class=\"data row36 col4\" >19</td>\\n                        <td id=\"T_6c2ae_row36_col5\" class=\"data row36 col5\" >98</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row37\" class=\"row_heading level0 row37\" >37</th>\\n                        <td id=\"T_6c2ae_row37_col0\" class=\"data row37 col0\" >Sebastian</td>\\n                        <td id=\"T_6c2ae_row37_col1\" class=\"data row37 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row37_col2\" class=\"data row37 col2\" >1</td>\\n                        <td id=\"T_6c2ae_row37_col3\" class=\"data row37 col3\" >14</td>\\n                        <td id=\"T_6c2ae_row37_col4\" class=\"data row37 col4\" >68</td>\\n                        <td id=\"T_6c2ae_row37_col5\" class=\"data row37 col5\" >48</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row38\" class=\"row_heading level0 row38\" >38</th>\\n                        <td id=\"T_6c2ae_row38_col0\" class=\"data row38 col0\" >Elijah</td>\\n                        <td id=\"T_6c2ae_row38_col1\" class=\"data row38 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row38_col2\" class=\"data row38 col2\" >97</td>\\n                        <td id=\"T_6c2ae_row38_col3\" class=\"data row38 col3\" >89</td>\\n                        <td id=\"T_6c2ae_row38_col4\" class=\"data row38 col4\" >15</td>\\n                        <td id=\"T_6c2ae_row38_col5\" class=\"data row38 col5\" >46</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row39\" class=\"row_heading level0 row39\" >39</th>\\n                        <td id=\"T_6c2ae_row39_col0\" class=\"data row39 col0\" >Harley</td>\\n                        <td id=\"T_6c2ae_row39_col1\" class=\"data row39 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row39_col2\" class=\"data row39 col2\" >2</td>\\n                        <td id=\"T_6c2ae_row39_col3\" class=\"data row39 col3\" >99</td>\\n                        <td id=\"T_6c2ae_row39_col4\" class=\"data row39 col4\" >12</td>\\n                        <td id=\"T_6c2ae_row39_col5\" class=\"data row39 col5\" >13</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row40\" class=\"row_heading level0 row40\" >40</th>\\n                        <td id=\"T_6c2ae_row40_col0\" class=\"data row40 col0\" >Toby</td>\\n                        <td id=\"T_6c2ae_row40_col1\" class=\"data row40 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row40_col2\" class=\"data row40 col2\" >52</td>\\n                        <td id=\"T_6c2ae_row40_col3\" class=\"data row40 col3\" >27</td>\\n                        <td id=\"T_6c2ae_row40_col4\" class=\"data row40 col4\" >17</td>\\n                        <td id=\"T_6c2ae_row40_col5\" class=\"data row40 col5\" >68</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row41\" class=\"row_heading level0 row41\" >41</th>\\n                        <td id=\"T_6c2ae_row41_col0\" class=\"data row41 col0\" >Arlo8</td>\\n                        <td id=\"T_6c2ae_row41_col1\" class=\"data row41 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row41_col2\" class=\"data row41 col2\" >48</td>\\n                        <td id=\"T_6c2ae_row41_col3\" class=\"data row41 col3\" >34</td>\\n                        <td id=\"T_6c2ae_row41_col4\" class=\"data row41 col4\" >52</td>\\n                        <td id=\"T_6c2ae_row41_col5\" class=\"data row41 col5\" >51</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row42\" class=\"row_heading level0 row42\" >42</th>\\n                        <td id=\"T_6c2ae_row42_col0\" class=\"data row42 col0\" >Dylan</td>\\n                        <td id=\"T_6c2ae_row42_col1\" class=\"data row42 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row42_col2\" class=\"data row42 col2\" >86</td>\\n                        <td id=\"T_6c2ae_row42_col3\" class=\"data row42 col3\" >87</td>\\n                        <td id=\"T_6c2ae_row42_col4\" class=\"data row42 col4\" >65</td>\\n                        <td id=\"T_6c2ae_row42_col5\" class=\"data row42 col5\" >20</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row43\" class=\"row_heading level0 row43\" >43</th>\\n                        <td id=\"T_6c2ae_row43_col0\" class=\"data row43 col0\" >Jude</td>\\n                        <td id=\"T_6c2ae_row43_col1\" class=\"data row43 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row43_col2\" class=\"data row43 col2\" >8</td>\\n                        <td id=\"T_6c2ae_row43_col3\" class=\"data row43 col3\" >45</td>\\n                        <td id=\"T_6c2ae_row43_col4\" class=\"data row43 col4\" >13</td>\\n                        <td id=\"T_6c2ae_row43_col5\" class=\"data row43 col5\" >65</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row44\" class=\"row_heading level0 row44\" >44</th>\\n                        <td id=\"T_6c2ae_row44_col0\" class=\"data row44 col0\" >Benjamin</td>\\n                        <td id=\"T_6c2ae_row44_col1\" class=\"data row44 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row44_col2\" class=\"data row44 col2\" >15</td>\\n                        <td id=\"T_6c2ae_row44_col3\" class=\"data row44 col3\" >88</td>\\n                        <td id=\"T_6c2ae_row44_col4\" class=\"data row44 col4\" >52</td>\\n                        <td id=\"T_6c2ae_row44_col5\" class=\"data row44 col5\" >25</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row45\" class=\"row_heading level0 row45\" >45</th>\\n                        <td id=\"T_6c2ae_row45_col0\" class=\"data row45 col0\" >Rory9</td>\\n                        <td id=\"T_6c2ae_row45_col1\" class=\"data row45 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row45_col2\" class=\"data row45 col2\" >8</td>\\n                        <td id=\"T_6c2ae_row45_col3\" class=\"data row45 col3\" >12</td>\\n                        <td id=\"T_6c2ae_row45_col4\" class=\"data row45 col4\" >58</td>\\n                        <td id=\"T_6c2ae_row45_col5\" class=\"data row45 col5\" >27</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row46\" class=\"row_heading level0 row46\" >46</th>\\n                        <td id=\"T_6c2ae_row46_col0\" class=\"data row46 col0\" >Tommy</td>\\n                        <td id=\"T_6c2ae_row46_col1\" class=\"data row46 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row46_col2\" class=\"data row46 col2\" >29</td>\\n                        <td id=\"T_6c2ae_row46_col3\" class=\"data row46 col3\" >44</td>\\n                        <td id=\"T_6c2ae_row46_col4\" class=\"data row46 col4\" >28</td>\\n                        <td id=\"T_6c2ae_row46_col5\" class=\"data row46 col5\" >76</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row47\" class=\"row_heading level0 row47\" >47</th>\\n                        <td id=\"T_6c2ae_row47_col0\" class=\"data row47 col0\" >Jake3</td>\\n                        <td id=\"T_6c2ae_row47_col1\" class=\"data row47 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row47_col2\" class=\"data row47 col2\" >69</td>\\n                        <td id=\"T_6c2ae_row47_col3\" class=\"data row47 col3\" >23</td>\\n                        <td id=\"T_6c2ae_row47_col4\" class=\"data row47 col4\" >11</td>\\n                        <td id=\"T_6c2ae_row47_col5\" class=\"data row47 col5\" >40</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row48\" class=\"row_heading level0 row48\" >48</th>\\n                        <td id=\"T_6c2ae_row48_col0\" class=\"data row48 col0\" >Louie</td>\\n                        <td id=\"T_6c2ae_row48_col1\" class=\"data row48 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row48_col2\" class=\"data row48 col2\" >24</td>\\n                        <td id=\"T_6c2ae_row48_col3\" class=\"data row48 col3\" >84</td>\\n                        <td id=\"T_6c2ae_row48_col4\" class=\"data row48 col4\" >54</td>\\n                        <td id=\"T_6c2ae_row48_col5\" class=\"data row48 col5\" >11</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row49\" class=\"row_heading level0 row49\" >49</th>\\n                        <td id=\"T_6c2ae_row49_col0\" class=\"data row49 col0\" >Carter7</td>\\n                        <td id=\"T_6c2ae_row49_col1\" class=\"data row49 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row49_col2\" class=\"data row49 col2\" >57</td>\\n                        <td id=\"T_6c2ae_row49_col3\" class=\"data row49 col3\" >52</td>\\n                        <td id=\"T_6c2ae_row49_col4\" class=\"data row49 col4\" >77</td>\\n                        <td id=\"T_6c2ae_row49_col5\" class=\"data row49 col5\" >50</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row50\" class=\"row_heading level0 row50\" >50</th>\\n                        <td id=\"T_6c2ae_row50_col0\" class=\"data row50 col0\" >Jenson</td>\\n                        <td id=\"T_6c2ae_row50_col1\" class=\"data row50 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row50_col2\" class=\"data row50 col2\" >66</td>\\n                        <td id=\"T_6c2ae_row50_col3\" class=\"data row50 col3\" >77</td>\\n                        <td id=\"T_6c2ae_row50_col4\" class=\"data row50 col4\" >88</td>\\n                        <td id=\"T_6c2ae_row50_col5\" class=\"data row50 col5\" >74</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row51\" class=\"row_heading level0 row51\" >51</th>\\n                        <td id=\"T_6c2ae_row51_col0\" class=\"data row51 col0\" >Hugo0</td>\\n                        <td id=\"T_6c2ae_row51_col1\" class=\"data row51 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row51_col2\" class=\"data row51 col2\" >28</td>\\n                        <td id=\"T_6c2ae_row51_col3\" class=\"data row51 col3\" >25</td>\\n                        <td id=\"T_6c2ae_row51_col4\" class=\"data row51 col4\" >14</td>\\n                        <td id=\"T_6c2ae_row51_col5\" class=\"data row51 col5\" >71</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row52\" class=\"row_heading level0 row52\" >52</th>\\n                        <td id=\"T_6c2ae_row52_col0\" class=\"data row52 col0\" >Bobby1</td>\\n                        <td id=\"T_6c2ae_row52_col1\" class=\"data row52 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row52_col2\" class=\"data row52 col2\" >50</td>\\n                        <td id=\"T_6c2ae_row52_col3\" class=\"data row52 col3\" >55</td>\\n                        <td id=\"T_6c2ae_row52_col4\" class=\"data row52 col4\" >60</td>\\n                        <td id=\"T_6c2ae_row52_col5\" class=\"data row52 col5\" >59</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row53\" class=\"row_heading level0 row53\" >53</th>\\n                        <td id=\"T_6c2ae_row53_col0\" class=\"data row53 col0\" >Frankie</td>\\n                        <td id=\"T_6c2ae_row53_col1\" class=\"data row53 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row53_col2\" class=\"data row53 col2\" >18</td>\\n                        <td id=\"T_6c2ae_row53_col3\" class=\"data row53 col3\" >62</td>\\n                        <td id=\"T_6c2ae_row53_col4\" class=\"data row53 col4\" >52</td>\\n                        <td id=\"T_6c2ae_row53_col5\" class=\"data row53 col5\" >33</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row54\" class=\"row_heading level0 row54\" >54</th>\\n                        <td id=\"T_6c2ae_row54_col0\" class=\"data row54 col0\" >Ollie3</td>\\n                        <td id=\"T_6c2ae_row54_col1\" class=\"data row54 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row54_col2\" class=\"data row54 col2\" >10</td>\\n                        <td id=\"T_6c2ae_row54_col3\" class=\"data row54 col3\" >76</td>\\n                        <td id=\"T_6c2ae_row54_col4\" class=\"data row54 col4\" >30</td>\\n                        <td id=\"T_6c2ae_row54_col5\" class=\"data row54 col5\" >36</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row55\" class=\"row_heading level0 row55\" >55</th>\\n                        <td id=\"T_6c2ae_row55_col0\" class=\"data row55 col0\" >Zachary</td>\\n                        <td id=\"T_6c2ae_row55_col1\" class=\"data row55 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row55_col2\" class=\"data row55 col2\" >12</td>\\n                        <td id=\"T_6c2ae_row55_col3\" class=\"data row55 col3\" >71</td>\\n                        <td id=\"T_6c2ae_row55_col4\" class=\"data row55 col4\" >85</td>\\n                        <td id=\"T_6c2ae_row55_col5\" class=\"data row55 col5\" >93</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row56\" class=\"row_heading level0 row56\" >56</th>\\n                        <td id=\"T_6c2ae_row56_col0\" class=\"data row56 col0\" >David</td>\\n                        <td id=\"T_6c2ae_row56_col1\" class=\"data row56 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row56_col2\" class=\"data row56 col2\" >21</td>\\n                        <td id=\"T_6c2ae_row56_col3\" class=\"data row56 col3\" >47</td>\\n                        <td id=\"T_6c2ae_row56_col4\" class=\"data row56 col4\" >99</td>\\n                        <td id=\"T_6c2ae_row56_col5\" class=\"data row56 col5\" >2</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row57\" class=\"row_heading level0 row57\" >57</th>\\n                        <td id=\"T_6c2ae_row57_col0\" class=\"data row57 col0\" >Albie1</td>\\n                        <td id=\"T_6c2ae_row57_col1\" class=\"data row57 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row57_col2\" class=\"data row57 col2\" >79</td>\\n                        <td id=\"T_6c2ae_row57_col3\" class=\"data row57 col3\" >82</td>\\n                        <td id=\"T_6c2ae_row57_col4\" class=\"data row57 col4\" >56</td>\\n                        <td id=\"T_6c2ae_row57_col5\" class=\"data row57 col5\" >96</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row58\" class=\"row_heading level0 row58\" >58</th>\\n                        <td id=\"T_6c2ae_row58_col0\" class=\"data row58 col0\" >Lewis</td>\\n                        <td id=\"T_6c2ae_row58_col1\" class=\"data row58 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row58_col2\" class=\"data row58 col2\" >4</td>\\n                        <td id=\"T_6c2ae_row58_col3\" class=\"data row58 col3\" >34</td>\\n                        <td id=\"T_6c2ae_row58_col4\" class=\"data row58 col4\" >77</td>\\n                        <td id=\"T_6c2ae_row58_col5\" class=\"data row58 col5\" >28</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row59\" class=\"row_heading level0 row59\" >59</th>\\n                        <td id=\"T_6c2ae_row59_col0\" class=\"data row59 col0\" >Luca</td>\\n                        <td id=\"T_6c2ae_row59_col1\" class=\"data row59 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row59_col2\" class=\"data row59 col2\" >5</td>\\n                        <td id=\"T_6c2ae_row59_col3\" class=\"data row59 col3\" >40</td>\\n                        <td id=\"T_6c2ae_row59_col4\" class=\"data row59 col4\" >91</td>\\n                        <td id=\"T_6c2ae_row59_col5\" class=\"data row59 col5\" >83</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row60\" class=\"row_heading level0 row60\" >60</th>\\n                        <td id=\"T_6c2ae_row60_col0\" class=\"data row60 col0\" >Ronnie</td>\\n                        <td id=\"T_6c2ae_row60_col1\" class=\"data row60 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row60_col2\" class=\"data row60 col2\" >53</td>\\n                        <td id=\"T_6c2ae_row60_col3\" class=\"data row60 col3\" >13</td>\\n                        <td id=\"T_6c2ae_row60_col4\" class=\"data row60 col4\" >34</td>\\n                        <td id=\"T_6c2ae_row60_col5\" class=\"data row60 col5\" >99</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row61\" class=\"row_heading level0 row61\" >61</th>\\n                        <td id=\"T_6c2ae_row61_col0\" class=\"data row61 col0\" >Jackson5</td>\\n                        <td id=\"T_6c2ae_row61_col1\" class=\"data row61 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row61_col2\" class=\"data row61 col2\" >6</td>\\n                        <td id=\"T_6c2ae_row61_col3\" class=\"data row61 col3\" >10</td>\\n                        <td id=\"T_6c2ae_row61_col4\" class=\"data row61 col4\" >15</td>\\n                        <td id=\"T_6c2ae_row61_col5\" class=\"data row61 col5\" >33</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row62\" class=\"row_heading level0 row62\" >62</th>\\n                        <td id=\"T_6c2ae_row62_col0\" class=\"data row62 col0\" >Matthew</td>\\n                        <td id=\"T_6c2ae_row62_col1\" class=\"data row62 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row62_col2\" class=\"data row62 col2\" >44</td>\\n                        <td id=\"T_6c2ae_row62_col3\" class=\"data row62 col3\" >33</td>\\n                        <td id=\"T_6c2ae_row62_col4\" class=\"data row62 col4\" >41</td>\\n                        <td id=\"T_6c2ae_row62_col5\" class=\"data row62 col5\" >98</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row63\" class=\"row_heading level0 row63\" >63</th>\\n                        <td id=\"T_6c2ae_row63_col0\" class=\"data row63 col0\" >Alex</td>\\n                        <td id=\"T_6c2ae_row63_col1\" class=\"data row63 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row63_col2\" class=\"data row63 col2\" >14</td>\\n                        <td id=\"T_6c2ae_row63_col3\" class=\"data row63 col3\" >70</td>\\n                        <td id=\"T_6c2ae_row63_col4\" class=\"data row63 col4\" >55</td>\\n                        <td id=\"T_6c2ae_row63_col5\" class=\"data row63 col5\" >87</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row64\" class=\"row_heading level0 row64\" >64</th>\\n                        <td id=\"T_6c2ae_row64_col0\" class=\"data row64 col0\" >Harvey2</td>\\n                        <td id=\"T_6c2ae_row64_col1\" class=\"data row64 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row64_col2\" class=\"data row64 col2\" >43</td>\\n                        <td id=\"T_6c2ae_row64_col3\" class=\"data row64 col3\" >76</td>\\n                        <td id=\"T_6c2ae_row64_col4\" class=\"data row64 col4\" >87</td>\\n                        <td id=\"T_6c2ae_row64_col5\" class=\"data row64 col5\" >90</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row65\" class=\"row_heading level0 row65\" >65</th>\\n                        <td id=\"T_6c2ae_row65_col0\" class=\"data row65 col0\" >Reuben</td>\\n                        <td id=\"T_6c2ae_row65_col1\" class=\"data row65 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row65_col2\" class=\"data row65 col2\" >70</td>\\n                        <td id=\"T_6c2ae_row65_col3\" class=\"data row65 col3\" >72</td>\\n                        <td id=\"T_6c2ae_row65_col4\" class=\"data row65 col4\" >76</td>\\n                        <td id=\"T_6c2ae_row65_col5\" class=\"data row65 col5\" >56</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row66\" class=\"row_heading level0 row66\" >66</th>\\n                        <td id=\"T_6c2ae_row66_col0\" class=\"data row66 col0\" >Jayden6</td>\\n                        <td id=\"T_6c2ae_row66_col1\" class=\"data row66 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row66_col2\" class=\"data row66 col2\" >64</td>\\n                        <td id=\"T_6c2ae_row66_col3\" class=\"data row66 col3\" >21</td>\\n                        <td id=\"T_6c2ae_row66_col4\" class=\"data row66 col4\" >10</td>\\n                        <td id=\"T_6c2ae_row66_col5\" class=\"data row66 col5\" >21</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row67\" class=\"row_heading level0 row67\" >67</th>\\n                        <td id=\"T_6c2ae_row67_col0\" class=\"data row67 col0\" >Caleb</td>\\n                        <td id=\"T_6c2ae_row67_col1\" class=\"data row67 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row67_col2\" class=\"data row67 col2\" >64</td>\\n                        <td id=\"T_6c2ae_row67_col3\" class=\"data row67 col3\" >34</td>\\n                        <td id=\"T_6c2ae_row67_col4\" class=\"data row67 col4\" >46</td>\\n                        <td id=\"T_6c2ae_row67_col5\" class=\"data row67 col5\" >88</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row68\" class=\"row_heading level0 row68\" >68</th>\\n                        <td id=\"T_6c2ae_row68_col0\" class=\"data row68 col0\" >Hunter3</td>\\n                        <td id=\"T_6c2ae_row68_col1\" class=\"data row68 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row68_col2\" class=\"data row68 col2\" >38</td>\\n                        <td id=\"T_6c2ae_row68_col3\" class=\"data row68 col3\" >80</td>\\n                        <td id=\"T_6c2ae_row68_col4\" class=\"data row68 col4\" >82</td>\\n                        <td id=\"T_6c2ae_row68_col5\" class=\"data row68 col5\" >40</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row69\" class=\"row_heading level0 row69\" >69</th>\\n                        <td id=\"T_6c2ae_row69_col0\" class=\"data row69 col0\" >Theodore3</td>\\n                        <td id=\"T_6c2ae_row69_col1\" class=\"data row69 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row69_col2\" class=\"data row69 col2\" >43</td>\\n                        <td id=\"T_6c2ae_row69_col3\" class=\"data row69 col3\" >7</td>\\n                        <td id=\"T_6c2ae_row69_col4\" class=\"data row69 col4\" >68</td>\\n                        <td id=\"T_6c2ae_row69_col5\" class=\"data row69 col5\" >80</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row70\" class=\"row_heading level0 row70\" >70</th>\\n                        <td id=\"T_6c2ae_row70_col0\" class=\"data row70 col0\" >Nathan</td>\\n                        <td id=\"T_6c2ae_row70_col1\" class=\"data row70 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row70_col2\" class=\"data row70 col2\" >87</td>\\n                        <td id=\"T_6c2ae_row70_col3\" class=\"data row70 col3\" >77</td>\\n                        <td id=\"T_6c2ae_row70_col4\" class=\"data row70 col4\" >62</td>\\n                        <td id=\"T_6c2ae_row70_col5\" class=\"data row70 col5\" >13</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row71\" class=\"row_heading level0 row71\" >71</th>\\n                        <td id=\"T_6c2ae_row71_col0\" class=\"data row71 col0\" >Blake</td>\\n                        <td id=\"T_6c2ae_row71_col1\" class=\"data row71 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row71_col2\" class=\"data row71 col2\" >78</td>\\n                        <td id=\"T_6c2ae_row71_col3\" class=\"data row71 col3\" >23</td>\\n                        <td id=\"T_6c2ae_row71_col4\" class=\"data row71 col4\" >93</td>\\n                        <td id=\"T_6c2ae_row71_col5\" class=\"data row71 col5\" >9</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row72\" class=\"row_heading level0 row72\" >72</th>\\n                        <td id=\"T_6c2ae_row72_col0\" class=\"data row72 col0\" >Luke6</td>\\n                        <td id=\"T_6c2ae_row72_col1\" class=\"data row72 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row72_col2\" class=\"data row72 col2\" >15</td>\\n                        <td id=\"T_6c2ae_row72_col3\" class=\"data row72 col3\" >97</td>\\n                        <td id=\"T_6c2ae_row72_col4\" class=\"data row72 col4\" >95</td>\\n                        <td id=\"T_6c2ae_row72_col5\" class=\"data row72 col5\" >99</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row73\" class=\"row_heading level0 row73\" >73</th>\\n                        <td id=\"T_6c2ae_row73_col0\" class=\"data row73 col0\" >Elliot</td>\\n                        <td id=\"T_6c2ae_row73_col1\" class=\"data row73 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row73_col2\" class=\"data row73 col2\" >15</td>\\n                        <td id=\"T_6c2ae_row73_col3\" class=\"data row73 col3\" >17</td>\\n                        <td id=\"T_6c2ae_row73_col4\" class=\"data row73 col4\" >76</td>\\n                        <td id=\"T_6c2ae_row73_col5\" class=\"data row73 col5\" >22</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row74\" class=\"row_heading level0 row74\" >74</th>\\n                        <td id=\"T_6c2ae_row74_col0\" class=\"data row74 col0\" >Roman</td>\\n                        <td id=\"T_6c2ae_row74_col1\" class=\"data row74 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row74_col2\" class=\"data row74 col2\" >73</td>\\n                        <td id=\"T_6c2ae_row74_col3\" class=\"data row74 col3\" >1</td>\\n                        <td id=\"T_6c2ae_row74_col4\" class=\"data row74 col4\" >25</td>\\n                        <td id=\"T_6c2ae_row74_col5\" class=\"data row74 col5\" >44</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row75\" class=\"row_heading level0 row75\" >75</th>\\n                        <td id=\"T_6c2ae_row75_col0\" class=\"data row75 col0\" >Stanley</td>\\n                        <td id=\"T_6c2ae_row75_col1\" class=\"data row75 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row75_col2\" class=\"data row75 col2\" >69</td>\\n                        <td id=\"T_6c2ae_row75_col3\" class=\"data row75 col3\" >71</td>\\n                        <td id=\"T_6c2ae_row75_col4\" class=\"data row75 col4\" >39</td>\\n                        <td id=\"T_6c2ae_row75_col5\" class=\"data row75 col5\" >97</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row76\" class=\"row_heading level0 row76\" >76</th>\\n                        <td id=\"T_6c2ae_row76_col0\" class=\"data row76 col0\" >Dexter</td>\\n                        <td id=\"T_6c2ae_row76_col1\" class=\"data row76 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row76_col2\" class=\"data row76 col2\" >73</td>\\n                        <td id=\"T_6c2ae_row76_col3\" class=\"data row76 col3\" >94</td>\\n                        <td id=\"T_6c2ae_row76_col4\" class=\"data row76 col4\" >53</td>\\n                        <td id=\"T_6c2ae_row76_col5\" class=\"data row76 col5\" >20</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row77\" class=\"row_heading level0 row77\" >77</th>\\n                        <td id=\"T_6c2ae_row77_col0\" class=\"data row77 col0\" >Michael</td>\\n                        <td id=\"T_6c2ae_row77_col1\" class=\"data row77 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row77_col2\" class=\"data row77 col2\" >89</td>\\n                        <td id=\"T_6c2ae_row77_col3\" class=\"data row77 col3\" >21</td>\\n                        <td id=\"T_6c2ae_row77_col4\" class=\"data row77 col4\" >59</td>\\n                        <td id=\"T_6c2ae_row77_col5\" class=\"data row77 col5\" >92</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row78\" class=\"row_heading level0 row78\" >78</th>\\n                        <td id=\"T_6c2ae_row78_col0\" class=\"data row78 col0\" >Elliott</td>\\n                        <td id=\"T_6c2ae_row78_col1\" class=\"data row78 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row78_col2\" class=\"data row78 col2\" >9</td>\\n                        <td id=\"T_6c2ae_row78_col3\" class=\"data row78 col3\" >31</td>\\n                        <td id=\"T_6c2ae_row78_col4\" class=\"data row78 col4\" >33</td>\\n                        <td id=\"T_6c2ae_row78_col5\" class=\"data row78 col5\" >60</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row79\" class=\"row_heading level0 row79\" >79</th>\\n                        <td id=\"T_6c2ae_row79_col0\" class=\"data row79 col0\" >Tyler</td>\\n                        <td id=\"T_6c2ae_row79_col1\" class=\"data row79 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row79_col2\" class=\"data row79 col2\" >75</td>\\n                        <td id=\"T_6c2ae_row79_col3\" class=\"data row79 col3\" >16</td>\\n                        <td id=\"T_6c2ae_row79_col4\" class=\"data row79 col4\" >44</td>\\n                        <td id=\"T_6c2ae_row79_col5\" class=\"data row79 col5\" >63</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row80\" class=\"row_heading level0 row80\" >80</th>\\n                        <td id=\"T_6c2ae_row80_col0\" class=\"data row80 col0\" >Ryan</td>\\n                        <td id=\"T_6c2ae_row80_col1\" class=\"data row80 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row80_col2\" class=\"data row80 col2\" >92</td>\\n                        <td id=\"T_6c2ae_row80_col3\" class=\"data row80 col3\" >70</td>\\n                        <td id=\"T_6c2ae_row80_col4\" class=\"data row80 col4\" >64</td>\\n                        <td id=\"T_6c2ae_row80_col5\" class=\"data row80 col5\" >31</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row81\" class=\"row_heading level0 row81\" >81</th>\\n                        <td id=\"T_6c2ae_row81_col0\" class=\"data row81 col0\" >Ellis</td>\\n                        <td id=\"T_6c2ae_row81_col1\" class=\"data row81 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row81_col2\" class=\"data row81 col2\" >34</td>\\n                        <td id=\"T_6c2ae_row81_col3\" class=\"data row81 col3\" >34</td>\\n                        <td id=\"T_6c2ae_row81_col4\" class=\"data row81 col4\" >77</td>\\n                        <td id=\"T_6c2ae_row81_col5\" class=\"data row81 col5\" >42</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row82\" class=\"row_heading level0 row82\" >82</th>\\n                        <td id=\"T_6c2ae_row82_col0\" class=\"data row82 col0\" >Finn</td>\\n                        <td id=\"T_6c2ae_row82_col1\" class=\"data row82 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row82_col2\" class=\"data row82 col2\" >4</td>\\n                        <td id=\"T_6c2ae_row82_col3\" class=\"data row82 col3\" >1</td>\\n                        <td id=\"T_6c2ae_row82_col4\" class=\"data row82 col4\" >55</td>\\n                        <td id=\"T_6c2ae_row82_col5\" class=\"data row82 col5\" >32</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row83\" class=\"row_heading level0 row83\" >83</th>\\n                        <td id=\"T_6c2ae_row83_col0\" class=\"data row83 col0\" >Albert0</td>\\n                        <td id=\"T_6c2ae_row83_col1\" class=\"data row83 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row83_col2\" class=\"data row83 col2\" >85</td>\\n                        <td id=\"T_6c2ae_row83_col3\" class=\"data row83 col3\" >38</td>\\n                        <td id=\"T_6c2ae_row83_col4\" class=\"data row83 col4\" >41</td>\\n                        <td id=\"T_6c2ae_row83_col5\" class=\"data row83 col5\" >17</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row84\" class=\"row_heading level0 row84\" >84</th>\\n                        <td id=\"T_6c2ae_row84_col0\" class=\"data row84 col0\" >Kai</td>\\n                        <td id=\"T_6c2ae_row84_col1\" class=\"data row84 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row84_col2\" class=\"data row84 col2\" >66</td>\\n                        <td id=\"T_6c2ae_row84_col3\" class=\"data row84 col3\" >45</td>\\n                        <td id=\"T_6c2ae_row84_col4\" class=\"data row84 col4\" >13</td>\\n                        <td id=\"T_6c2ae_row84_col5\" class=\"data row84 col5\" >48</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row85\" class=\"row_heading level0 row85\" >85</th>\\n                        <td id=\"T_6c2ae_row85_col0\" class=\"data row85 col0\" >Liam</td>\\n                        <td id=\"T_6c2ae_row85_col1\" class=\"data row85 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row85_col2\" class=\"data row85 col2\" >2</td>\\n                        <td id=\"T_6c2ae_row85_col3\" class=\"data row85 col3\" >80</td>\\n                        <td id=\"T_6c2ae_row85_col4\" class=\"data row85 col4\" >24</td>\\n                        <td id=\"T_6c2ae_row85_col5\" class=\"data row85 col5\" >25</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row86\" class=\"row_heading level0 row86\" >86</th>\\n                        <td id=\"T_6c2ae_row86_col0\" class=\"data row86 col0\" >Calum</td>\\n                        <td id=\"T_6c2ae_row86_col1\" class=\"data row86 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row86_col2\" class=\"data row86 col2\" >14</td>\\n                        <td id=\"T_6c2ae_row86_col3\" class=\"data row86 col3\" >91</td>\\n                        <td id=\"T_6c2ae_row86_col4\" class=\"data row86 col4\" >16</td>\\n                        <td id=\"T_6c2ae_row86_col5\" class=\"data row86 col5\" >82</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row87\" class=\"row_heading level0 row87\" >87</th>\\n                        <td id=\"T_6c2ae_row87_col0\" class=\"data row87 col0\" >Louis2</td>\\n                        <td id=\"T_6c2ae_row87_col1\" class=\"data row87 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row87_col2\" class=\"data row87 col2\" >13</td>\\n                        <td id=\"T_6c2ae_row87_col3\" class=\"data row87 col3\" >94</td>\\n                        <td id=\"T_6c2ae_row87_col4\" class=\"data row87 col4\" >51</td>\\n                        <td id=\"T_6c2ae_row87_col5\" class=\"data row87 col5\" >22</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row88\" class=\"row_heading level0 row88\" >88</th>\\n                        <td id=\"T_6c2ae_row88_col0\" class=\"data row88 col0\" >Aaron</td>\\n                        <td id=\"T_6c2ae_row88_col1\" class=\"data row88 col1\" >A</td>\\n                        <td id=\"T_6c2ae_row88_col2\" class=\"data row88 col2\" >96</td>\\n                        <td id=\"T_6c2ae_row88_col3\" class=\"data row88 col3\" >75</td>\\n                        <td id=\"T_6c2ae_row88_col4\" class=\"data row88 col4\" >55</td>\\n                        <td id=\"T_6c2ae_row88_col5\" class=\"data row88 col5\" >8</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row89\" class=\"row_heading level0 row89\" >89</th>\\n                        <td id=\"T_6c2ae_row89_col0\" class=\"data row89 col0\" >Ezra</td>\\n                        <td id=\"T_6c2ae_row89_col1\" class=\"data row89 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row89_col2\" class=\"data row89 col2\" >16</td>\\n                        <td id=\"T_6c2ae_row89_col3\" class=\"data row89 col3\" >56</td>\\n                        <td id=\"T_6c2ae_row89_col4\" class=\"data row89 col4\" >86</td>\\n                        <td id=\"T_6c2ae_row89_col5\" class=\"data row89 col5\" >61</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row90\" class=\"row_heading level0 row90\" >90</th>\\n                        <td id=\"T_6c2ae_row90_col0\" class=\"data row90 col0\" >Leon</td>\\n                        <td id=\"T_6c2ae_row90_col1\" class=\"data row90 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row90_col2\" class=\"data row90 col2\" >38</td>\\n                        <td id=\"T_6c2ae_row90_col3\" class=\"data row90 col3\" >60</td>\\n                        <td id=\"T_6c2ae_row90_col4\" class=\"data row90 col4\" >31</td>\\n                        <td id=\"T_6c2ae_row90_col5\" class=\"data row90 col5\" >7</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row91\" class=\"row_heading level0 row91\" >91</th>\\n                        <td id=\"T_6c2ae_row91_col0\" class=\"data row91 col0\" >Connor</td>\\n                        <td id=\"T_6c2ae_row91_col1\" class=\"data row91 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row91_col2\" class=\"data row91 col2\" >62</td>\\n                        <td id=\"T_6c2ae_row91_col3\" class=\"data row91 col3\" >38</td>\\n                        <td id=\"T_6c2ae_row91_col4\" class=\"data row91 col4\" >63</td>\\n                        <td id=\"T_6c2ae_row91_col5\" class=\"data row91 col5\" >46</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row92\" class=\"row_heading level0 row92\" >92</th>\\n                        <td id=\"T_6c2ae_row92_col0\" class=\"data row92 col0\" >Grayson7</td>\\n                        <td id=\"T_6c2ae_row92_col1\" class=\"data row92 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row92_col2\" class=\"data row92 col2\" >59</td>\\n                        <td id=\"T_6c2ae_row92_col3\" class=\"data row92 col3\" >84</td>\\n                        <td id=\"T_6c2ae_row92_col4\" class=\"data row92 col4\" >74</td>\\n                        <td id=\"T_6c2ae_row92_col5\" class=\"data row92 col5\" >33</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row93\" class=\"row_heading level0 row93\" >93</th>\\n                        <td id=\"T_6c2ae_row93_col0\" class=\"data row93 col0\" >Jamie0</td>\\n                        <td id=\"T_6c2ae_row93_col1\" class=\"data row93 col1\" >B</td>\\n                        <td id=\"T_6c2ae_row93_col2\" class=\"data row93 col2\" >39</td>\\n                        <td id=\"T_6c2ae_row93_col3\" class=\"data row93 col3\" >97</td>\\n                        <td id=\"T_6c2ae_row93_col4\" class=\"data row93 col4\" >84</td>\\n                        <td id=\"T_6c2ae_row93_col5\" class=\"data row93 col5\" >55</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row94\" class=\"row_heading level0 row94\" >94</th>\\n                        <td id=\"T_6c2ae_row94_col0\" class=\"data row94 col0\" >Aiden</td>\\n                        <td id=\"T_6c2ae_row94_col1\" class=\"data row94 col1\" >D</td>\\n                        <td id=\"T_6c2ae_row94_col2\" class=\"data row94 col2\" >20</td>\\n                        <td id=\"T_6c2ae_row94_col3\" class=\"data row94 col3\" >31</td>\\n                        <td id=\"T_6c2ae_row94_col4\" class=\"data row94 col4\" >62</td>\\n                        <td id=\"T_6c2ae_row94_col5\" class=\"data row94 col5\" >68</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row95\" class=\"row_heading level0 row95\" >95</th>\\n                        <td id=\"T_6c2ae_row95_col0\" class=\"data row95 col0\" >Gabriel</td>\\n                        <td id=\"T_6c2ae_row95_col1\" class=\"data row95 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row95_col2\" class=\"data row95 col2\" >48</td>\\n                        <td id=\"T_6c2ae_row95_col3\" class=\"data row95 col3\" >59</td>\\n                        <td id=\"T_6c2ae_row95_col4\" class=\"data row95 col4\" >87</td>\\n                        <td id=\"T_6c2ae_row95_col5\" class=\"data row95 col5\" >74</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row96\" class=\"row_heading level0 row96\" >96</th>\\n                        <td id=\"T_6c2ae_row96_col0\" class=\"data row96 col0\" >Austin7</td>\\n                        <td id=\"T_6c2ae_row96_col1\" class=\"data row96 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row96_col2\" class=\"data row96 col2\" >21</td>\\n                        <td id=\"T_6c2ae_row96_col3\" class=\"data row96 col3\" >31</td>\\n                        <td id=\"T_6c2ae_row96_col4\" class=\"data row96 col4\" >30</td>\\n                        <td id=\"T_6c2ae_row96_col5\" class=\"data row96 col5\" >43</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row97\" class=\"row_heading level0 row97\" >97</th>\\n                        <td id=\"T_6c2ae_row97_col0\" class=\"data row97 col0\" >Lincoln4</td>\\n                        <td id=\"T_6c2ae_row97_col1\" class=\"data row97 col1\" >C</td>\\n                        <td id=\"T_6c2ae_row97_col2\" class=\"data row97 col2\" >98</td>\\n                        <td id=\"T_6c2ae_row97_col3\" class=\"data row97 col3\" >93</td>\\n                        <td id=\"T_6c2ae_row97_col4\" class=\"data row97 col4\" >1</td>\\n                        <td id=\"T_6c2ae_row97_col5\" class=\"data row97 col5\" >20</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row98\" class=\"row_heading level0 row98\" >98</th>\\n                        <td id=\"T_6c2ae_row98_col0\" class=\"data row98 col0\" >Eli</td>\\n                        <td id=\"T_6c2ae_row98_col1\" class=\"data row98 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row98_col2\" class=\"data row98 col2\" >11</td>\\n                        <td id=\"T_6c2ae_row98_col3\" class=\"data row98 col3\" >74</td>\\n                        <td id=\"T_6c2ae_row98_col4\" class=\"data row98 col4\" >58</td>\\n                        <td id=\"T_6c2ae_row98_col5\" class=\"data row98 col5\" >91</td>\\n            </tr>\\n            <tr>\\n                        <th id=\"T_6c2ae_level0_row99\" class=\"row_heading level0 row99\" >99</th>\\n                        <td id=\"T_6c2ae_row99_col0\" class=\"data row99 col0\" >Ben</td>\\n                        <td id=\"T_6c2ae_row99_col1\" class=\"data row99 col1\" >E</td>\\n                        <td id=\"T_6c2ae_row99_col2\" class=\"data row99 col2\" >21</td>\\n                        <td id=\"T_6c2ae_row99_col3\" class=\"data row99 col3\" >43</td>\\n                        <td id=\"T_6c2ae_row99_col4\" class=\"data row99 col4\" >41</td>\\n                        <td id=\"T_6c2ae_row99_col5\" class=\"data row99 col5\" >74</td>\\n            </tr>\\n    </tbody></table>'"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.style.render()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['<style  type=\"text/css\" >',\n",
       " '#T_6be29_row1_col1{',\n",
       " '            background-color:  red;',\n",
       " '        }</style><table id=\"T_6be29_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>',\n",
       " '                <tr>',\n",
       " '                        <th id=\"T_6be29_level0_row0\" class=\"row_heading level0 row0\" >0</th>',\n",
       " '                        <td id=\"T_6be29_row0_col0\" class=\"data row0 col0\" >Liver</td>',\n",
       " '                        <td id=\"T_6be29_row0_col1\" class=\"data row0 col1\" >E</td>',\n",
       " '                        <td id=\"T_6be29_row0_col2\" class=\"data row0 col2\" >89</td>',\n",
       " '                        <td id=\"T_6be29_row0_col3\" class=\"data row0 col3\" >21</td>']"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 过虑换行取部分，增加可读性\n",
    "df.style.highlight_null().render().split('\\n')[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style  type=\"text/css\" >\n",
       "</style><table id=\"T_427b7_\" ><thead>    <tr>        <th class=\"blank level0\" ></th>        <th class=\"col_heading level0 col0\" >name</th>        <th class=\"col_heading level0 col1\" >team</th>        <th class=\"col_heading level0 col2\" >Q1</th>        <th class=\"col_heading level0 col3\" >Q2</th>        <th class=\"col_heading level0 col4\" >Q3</th>        <th class=\"col_heading level0 col5\" >Q4</th>    </tr></thead><tbody>\n",
       "                <tr>\n",
       "                        <th id=\"T_427b7_level0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
       "                        <td id=\"T_427b7_row0_col0\" class=\"data row0 col0\" >Liver</td>\n",
       "                        <td id=\"T_427b7_row0_col1\" class=\"data row0 col1\" >E</td>\n",
       "                        <td id=\"T_427b7_row0_col2\" class=\"data row0 col2\" >89</td>\n",
       "                        <td id=\"T_427b7_row0_col3\" class=\"data row0 col3\" >21</td>\n",
       "                        <td id=\"T_427b7_row0_col4\" class=\"data row0 col4\" >24</td>\n",
       "                        <td id=\"T_427b7_row0_col5\" class=\"data row0 col5\" >64</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row1\" class=\"row_heading level0 row1\" >1</th>\n",
       "                        <td id=\"T_427b7_row1_col0\" class=\"data row1 col0\" >Arry</td>\n",
       "                        <td id=\"T_427b7_row1_col1\" class=\"data row1 col1\" >nan</td>\n",
       "                        <td id=\"T_427b7_row1_col2\" class=\"data row1 col2\" >36</td>\n",
       "                        <td id=\"T_427b7_row1_col3\" class=\"data row1 col3\" >37</td>\n",
       "                        <td id=\"T_427b7_row1_col4\" class=\"data row1 col4\" >37</td>\n",
       "                        <td id=\"T_427b7_row1_col5\" class=\"data row1 col5\" >57</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row2\" class=\"row_heading level0 row2\" >2</th>\n",
       "                        <td id=\"T_427b7_row2_col0\" class=\"data row2 col0\" >Ack</td>\n",
       "                        <td id=\"T_427b7_row2_col1\" class=\"data row2 col1\" >A</td>\n",
       "                        <td id=\"T_427b7_row2_col2\" class=\"data row2 col2\" >57</td>\n",
       "                        <td id=\"T_427b7_row2_col3\" class=\"data row2 col3\" >60</td>\n",
       "                        <td id=\"T_427b7_row2_col4\" class=\"data row2 col4\" >18</td>\n",
       "                        <td id=\"T_427b7_row2_col5\" class=\"data row2 col5\" >84</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row3\" class=\"row_heading level0 row3\" >3</th>\n",
       "                        <td id=\"T_427b7_row3_col0\" class=\"data row3 col0\" >Eorge</td>\n",
       "                        <td id=\"T_427b7_row3_col1\" class=\"data row3 col1\" >C</td>\n",
       "                        <td id=\"T_427b7_row3_col2\" class=\"data row3 col2\" >93</td>\n",
       "                        <td id=\"T_427b7_row3_col3\" class=\"data row3 col3\" >96</td>\n",
       "                        <td id=\"T_427b7_row3_col4\" class=\"data row3 col4\" >71</td>\n",
       "                        <td id=\"T_427b7_row3_col5\" class=\"data row3 col5\" >78</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row4\" class=\"row_heading level0 row4\" >4</th>\n",
       "                        <td id=\"T_427b7_row4_col0\" class=\"data row4 col0\" >Oah</td>\n",
       "                        <td id=\"T_427b7_row4_col1\" class=\"data row4 col1\" >D</td>\n",
       "                        <td id=\"T_427b7_row4_col2\" class=\"data row4 col2\" >65</td>\n",
       "                        <td id=\"T_427b7_row4_col3\" class=\"data row4 col3\" >49</td>\n",
       "                        <td id=\"T_427b7_row4_col4\" class=\"data row4 col4\" >61</td>\n",
       "                        <td id=\"T_427b7_row4_col5\" class=\"data row4 col5\" >86</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row5\" class=\"row_heading level0 row5\" >5</th>\n",
       "                        <td id=\"T_427b7_row5_col0\" class=\"data row5 col0\" >Harlie</td>\n",
       "                        <td id=\"T_427b7_row5_col1\" class=\"data row5 col1\" >C</td>\n",
       "                        <td id=\"T_427b7_row5_col2\" class=\"data row5 col2\" >24</td>\n",
       "                        <td id=\"T_427b7_row5_col3\" class=\"data row5 col3\" >13</td>\n",
       "                        <td id=\"T_427b7_row5_col4\" class=\"data row5 col4\" >87</td>\n",
       "                        <td id=\"T_427b7_row5_col5\" class=\"data row5 col5\" >43</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row6\" class=\"row_heading level0 row6\" >6</th>\n",
       "                        <td id=\"T_427b7_row6_col0\" class=\"data row6 col0\" >Acob</td>\n",
       "                        <td id=\"T_427b7_row6_col1\" class=\"data row6 col1\" >B</td>\n",
       "                        <td id=\"T_427b7_row6_col2\" class=\"data row6 col2\" >61</td>\n",
       "                        <td id=\"T_427b7_row6_col3\" class=\"data row6 col3\" >95</td>\n",
       "                        <td id=\"T_427b7_row6_col4\" class=\"data row6 col4\" >94</td>\n",
       "                        <td id=\"T_427b7_row6_col5\" class=\"data row6 col5\" >8</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row7\" class=\"row_heading level0 row7\" >7</th>\n",
       "                        <td id=\"T_427b7_row7_col0\" class=\"data row7 col0\" >Lfie</td>\n",
       "                        <td id=\"T_427b7_row7_col1\" class=\"data row7 col1\" >A</td>\n",
       "                        <td id=\"T_427b7_row7_col2\" class=\"data row7 col2\" >9</td>\n",
       "                        <td id=\"T_427b7_row7_col3\" class=\"data row7 col3\" >10</td>\n",
       "                        <td id=\"T_427b7_row7_col4\" class=\"data row7 col4\" >99</td>\n",
       "                        <td id=\"T_427b7_row7_col5\" class=\"data row7 col5\" >37</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row8\" class=\"row_heading level0 row8\" >8</th>\n",
       "                        <td id=\"T_427b7_row8_col0\" class=\"data row8 col0\" >Reddie</td>\n",
       "                        <td id=\"T_427b7_row8_col1\" class=\"data row8 col1\" >D</td>\n",
       "                        <td id=\"T_427b7_row8_col2\" class=\"data row8 col2\" >64</td>\n",
       "                        <td id=\"T_427b7_row8_col3\" class=\"data row8 col3\" >93</td>\n",
       "                        <td id=\"T_427b7_row8_col4\" class=\"data row8 col4\" >57</td>\n",
       "                        <td id=\"T_427b7_row8_col5\" class=\"data row8 col5\" >72</td>\n",
       "            </tr>\n",
       "            <tr>\n",
       "                        <th id=\"T_427b7_level0_row9\" class=\"row_heading level0 row9\" >9</th>\n",
       "                        <td id=\"T_427b7_row9_col0\" class=\"data row9 col0\" >Oscar</td>\n",
       "                        <td id=\"T_427b7_row9_col1\" class=\"data row9 col1\" >A</td>\n",
       "                        <td id=\"T_427b7_row9_col2\" class=\"data row9 col2\" >77</td>\n",
       "                        <td id=\"T_427b7_row9_col3\" class=\"data row9 col3\" >9</td>\n",
       "                        <td id=\"T_427b7_row9_col4\" class=\"data row9 col4\" >26</td>\n",
       "                        <td id=\"T_427b7_row9_col5\" class=\"data row9 col5\" >67</td>\n",
       "            </tr>\n",
       "    </tbody></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 在 notebook 中可以会用来解析展示生成的 html\n",
    "from IPython.display import HTML\n",
    "HTML(df[:10].style.render())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 生成 html 的属性命名\n",
    "以下是生成的 html 中各属性的命名规则。\n",
    "https://pandas.pydata.org/docs/user_guide/style.html#CSS-classes"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "272px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
